A simple library manager that handles books and loans with a relational database(MySQL) and a NoSQL-solution (AWS DynamoDB). The application is a Java-terminal application and can synchronize data between MySQL and DynamoDB.
- Handles books and loans
- Show books and loans from MySQL
- Synchronize books and loans to AWS DynamoDB
- User friendly menu in the terminal
MySQL is being used as the primary storage of books and loans. DynamoDB is being used to mirror the MySQL-data
Database relations
- One book can be borrowed by many borrowers over time 📖 -> ♾️
- One loan connects to one book and one borrower
books { (PK) book_id INT PRIMARY KEY, book_title STRING, author STRING, published_year INT, available BOOLEAN, }
borrowers { (PK) borrower_id INT PRIMARY KEY, borrower_name STRING, email STRING, phone_number STRING, }
loans { (PK) loan_id INT PRIMARY KEY, (FK) book_id INT FOREIGN KEY, (FK) borrower_id INT FOREIGN KEY, loan_date DATE, return_date DATE, }
- MySQL - Stores books, borrowers and loans.
- DynamoDB - Mirrors the MySQL-tables for data access.
- AWS SDK for Java - Used to interact with DynamoDB.
- Java version 17 or newer
- MySQL Server
- AWS DynamoDB
git clone https://github.com/TeeDjaay99/library_manager.git
cd library_manager
- Create a database with the SQL-script library_db.sql.
- Update the MySQL connections in MySQLConnector.Java.
when you start the program a menu will be shown.
Library system - menu
- Show all books
- Show all loans
- Sync data to DynamoDB
- Exit Enter your choice:
- Show all books → Retrieves all books from MySQL and displays them.
- Show all loans → Retrieves loans from MySQL and shows who has borrowed what.
- Syncs data to DynamoDB → Copies books and loans to DynamoDB.
- Exit → Ends the program and closes it.
- CRUD-functions - Add the options to create, update and delete books and loans directly form the program.
- Webinterface - Develop a simple webapp to manage the library through a browser.
- Add some kind of other service from AWS to analyze statistics about loans.