A Manga Management System built using Java and MySQL database, implementing Object Oriented Programming principles and following the Data Access Object (DAO) pattern. The interface is console based and the application manages a collection of mangas and their respective mangakas (authors). The application used Java Database Connectivity (JDBC) to interact with the database.
- Add a manga (title, publication year, status and mangaka (author) name)
- Update and delete manga entries
- Search manga based on title
- Console-based UI which guides the user and makes it user-friendly
- Java - Core programming language
- MySQL - Relational database system
- JDBC - Java API to interact with databases
- DAO is an object/pattern which is used to retrieve access from a database.
- It separates a data resource's client interface from its data access mechanisms
- Makes it easier to switch databases e.g. if I wanted to switch from MySQL to MongoDB.
- DAO Interface:
- The Interface that defines the operations to be performed on a models object
- mangaDAO.java, mangakaDAO.java
- E.g. addManga, getAllMangas
- DAO Concrete class:
- The class implements the interface class and responsible from getting data such as from a database
- MangaDaoImpl.java, mangakaDaoImpl.java
- E.g. implements addManga method and does the logic for adding manga to db
- Model Objects:
- POJO containing getters/setters
- Manga.java, Mangaka.java
- Manga/Mangaka - POJO with getters/setters
- MangaDAO/MangakaDAO - Interface class
- MangaDaoImpl/MangakaDaoImpl - Implementation Class
- DatabaseConnection - establishes connection to db
- UserInterface - Handles UI of the program
- App - Entry point of the program
- MySQL is used as the database
- Mangaka table stores mangaka information
- Manga table stores manga information
You can access the SQL scripts for manga/mangaka in db_structuredump
- Viewing All Mangas
- Adding a manga
- Database Example
- The user can create a new manga by entering mangaka name
- Logic to check if mangaka exists
- If mangaka exists uses that id
- Or else creates new mangaka entry for mangaka table and uses that id
- title is unique index and add manga contains sql integrity exception to avoid duplicates
- The application currently does not include the URL, USER, PASSWORD details in databaseConnection.java
- Web-based UI: Implementing a web based front-end
- Java Persistance API (JPA)/Hibernates implementation
- JDBC requires manually writing the SQL queries and result mapping
- Using JPA can help hide the SQL and simplify database interactions
- Using Hibernate (JPA's implementation)
- UI validation: Adding input validation for console-based UI



