Name: Neil Cardoz
PRN: 23070126079
Batch: 23-27
A menu-driven Java console application for managing student records with persistent MySQL storage via JDBC.
- Add new student records (PRN, Name, Date of Birth, Marks)
- Display all students
- Search by PRN, Name, or Position
- Update existing student details
- Delete students
- Persistent storage in MySQL
- Java Development Kit (JDK 8+)
- MySQL Server
- MySQL JDBC Driver (Connector/J)
student-data-entry/
├── src/
│ └── com/example/studentapp/
│ ├── dao/
│ │ └── StudentDAO.java
│ ├── model/
│ │ └── Student.java
│ ├── util/
│ │ └── DBConnection.java
│ └── StudentApp.java
├── studentdb.sql
└── README.md
-
Clone the repository
git clone https://github.com/<your-username>/student-data-entry.git cd student-data-entry
-
Initialize the database
mysql -u root -p < studentdb.sqlThis creates the
studentdbdatabase andstudentstable. -
Configure credentials In
src/com/example/studentapp/util/DBConnection.java, update:private static final String URL = "jdbc:mysql://localhost:3306/studentdb"; private static final String USER = "appuser"; // your DB user private static final String PASSWORD = "StrongP@ssw0rd"; // your DB password
Compile and run using your IDE or command line:
javac -d bin src/com/example/studentapp/**/*.java
java -cp bin;path/to/mysql-connector-java.jar com.example.studentapp.StudentAppUpon launch, follow the console menu:
- Add Student
- Display All Students
- Search by PRN
- Search by Name
- Search by Position
- Update Student
- Delete Student
- Exit
Enter the corresponding number and follow prompts to perform operations.
- Fork the repository
- Create a branch:
git checkout -b feature/XYZ - Commit:
git commit -m "Add XYZ feature" - Push:
git push origin feature/XYZ - Open a Pull Request
This project is licensed under the MIT License.