This project implements a Student Management System using Java with JDBC (Java Database Connectivity). It follows the MVC (Model-View-Controller) architectural pattern with a Data Access Object (DAO) layer for database operations.
The application is structured in the following layers:
- View Layer: User interface for interacting with the application
- Controller Layer: Business logic and request handling
- DAO Layer: Database access and persistence operations
- Model Layer: Data representation objects
Below is the sequence diagram illustrating the flow of data from the View layer through the Controller to the DAO layer:
sequenceDiagram
participant View as View (Main)
participant Controller as Controller<br/>(StudentController)
participant DAO as DAO<br/>(DAOSQL)
participant DB as Database
Note over View,DB: User Action Triggered
View->>Controller: Request (e.g., getStudent())
activate Controller
Controller->>DAO: Call DAO Method
activate DAO
DAO->>DB: Execute SQL Query
activate DB
DB-->>DAO: Query Result
deactivate DB
DAO->>DAO: Parse Result to Student Object
DAO-->>Controller: Return Student/List
deactivate DAO
Controller->>Controller: Process Business Logic
Controller-->>View: Return Response
deactivate Controller
View->>View: Display Result to User
src/main/java/
├── api/
│ └── DataValidation.java # Data validation utilities
├── controller/
│ ├── IStudentController.java # Controller interface
│ └── StudentControllerImplementation.java # Controller implementation
├── dao/
│ ├── IDAO.java # DAO interface
│ └── DAOSQL.java # SQL implementation
├── exception/
│ ├── DAO_Excep.java # DAO exceptions
│ ├── Read_SQL_DAO_Excep.java # Read operation exceptions
│ ├── Student_Excep.java # Student-related exceptions
│ └── Write_SQL_DAO_Excep.java # Write operation exceptions
├── model/
│ └── Student.java # Student data model
└── view/
└── Main.java # Main entry point
- User requests to view a student (View)
- Controller receives the request and validates input
- Controller calls DAO's read method
- DAO executes SQL SELECT query
- DAO maps result to Student object
- Controller processes and returns to View
- View displays student information
- User submits new student information (View)
- Controller validates the data using DataValidation
- Controller calls DAO's write/create method
- DAO executes SQL INSERT/UPDATE query
- DAO returns success/failure status
- Controller handles response
- View confirms operation to user
- Language: Java
- Build Tool: Maven
- Database: SQL (via JDBC)
- Design Pattern: MVC + DAO
The application implements specific exception types for better error handling:
DAO_Excep: Generic DAO exceptionsRead_SQL_DAO_Excep: Read operation errorsWrite_SQL_DAO_Excep: Write operation errorsStudent_Excep: Student validation errors
- Configure your database connection in the DAO layer
- Run the Maven build:
mvn clean compile - Execute the main application from
Main.java