A console-based Student Management System built using Java, JDBC, and MySQL. The system allows users to manage student records stored in a MySQL database through a simple command-line interface.
- ➕ Add a new student
- 📋 View all students
- 🔍 Search student by ID
- ✏️ Update student details
- ❌ Delete student record
- 📊 Display total number of students
- Java
- JDBC (Java Database Connectivity)
- MySQL
- IntelliJ IDEA
- Git & GitHub
- Object-Oriented Programming (OOP)
- DAO (Data Access Object) Design Pattern
- JDBC Database Connectivity
- CRUD Operations
- Input Validation
- Modular Project Structure
Student-Management-System
│
├── src
│ ├── app
│ │ └── Main.java
│ │
│ ├── dao
│ │ └── StudentDAO.java
│ │
│ ├── db
│ │ └── DBConnection.java
│ │
│ └── model
│ └── Student.java
│
├── db.properties.example
├── README.md
└── .gitignore
Create a database in MySQL:
CREATE DATABASE studentdb;
USE studentdb;
CREATE TABLE students (
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(100),
branch VARCHAR(50),
age INT,
cgpa FLOAT
);git clone <https://github.com/Mayank-247/Student-Management-System.git>
Open the project in IntelliJ IDEA.
Copy the example file:
db.properties.example
Rename it to:
db.properties
Then add your MySQL credentials inside the file:
db.url=jdbc:mysql://localhost:3306/studentdb
db.user=root
db.password=your_password_here
Run:
Main.java
This project demonstrates:
- Java Object-Oriented Programming
- JDBC database connectivity
- DAO design pattern
- Implementation of CRUD operations
- Building a modular Java application
Possible enhancements:
- GUI interface using Java Swing
- Search student by name
- Export student data to CSV / Excel
- User authentication system
- Web version using Spring Boot
Mayank Singh
