I've tried to keep the schema as simple as possible as the only goal of this task was to implement what we've learned in the OOP semester.
so my focus was on applying OOP examples as much as needed, and I've used my backend knowledge working with a database to implement a GUI
application that glues OOP + database + GUI programming together.
- Database ->
mysql
- GUI framework ->
JavaFX
- IDE ->
Intellij IDEA community edition
This is a simple reading management
system which:
- the user can authenticate himself by signing up and logging in to the system
- the user can add, remove, delete, and update books based on progress.
- the user can export data to
Excel
sheet for further analysis
This is a demo of the running application
2023-12-10.11-07-42.mp4
CREATE TABLE `users` (
`user_id` int AUTO_INCREMENT NOT NULL PRIMARY KEY,
`username` VARCHAR(250),
`email` VARCHAR(250),
`password` VARCHAR(16),
`gender` VARCHAR(250)
);
CREATE TABLE `books` (
`id` int AUTO_INCREMENT NOT NULL PRIMARY KEY,
`title` VARCHAR(50),
`author_name` VARCHAR(50),
`user_id` int
);
ALTER TABLE `books` ADD CONSTRAINT `fk_books_users` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`);
DML queries used:
-- get all users
SELECT * FROM users;
-- count users
SELECT COUNT(id) FROM users;
-- signup user
INSERT INTO users (email, password, username, gender) VALUES (?, ?, ?, ?);
-- loging user
SELECT * FROM users where username = ?;
-- add book
INSERT INTO books (title, author_name, status, user_id) VALUES (?, ?, ?, ?);
-- update book
UPDATE books SET title = ?, author_name = ?, status = ? WHERE id = ?
-- delete book
DELETE FROM books WHERE id = ?;
-- count books for users
SELECT COUNT(id) FROM books;
- Implement user authentication (signup, login)
- Implement Book adding feature, prefetching the books for registered or already logged in users
- Implement Book Updating/Deletion
- Implement Export to Excel Functionality
- https://stackoverflow.com/questions/27556536/javafx-scene-layout-pane-cannot-be-cast-to-javafx-fxml-fxmlloader
- Change the schema
- Read about
ObservalList
(needed to update TableColumns in time); - implement UML design and presentation.
- upload the new PoC
- FUTURE -> (Refactor totalBook count to be based on tableView rows count only instead of the database)
- FUTURE -> Package the application & Dockersize.