Java Console Application for Managing Employee Records with Database Integration
The Employee Management System is a Java console application designed to perform CRUD (Create, Read, Update, Delete) operations on employee data stored in an Oracle database.
It demonstrates JDBC database connectivity, SQL operations, and object-oriented design to manage employee records efficiently.
- Add new employee records with ID, name, salary, and department
- Update employee salary by employee ID
- Delete employee records
- Retrieve single or all employee details
- Console-based interactive menu system
- JDBC connection to Oracle database
- JDBC API for database connection and SQL execution
- SQL queries for insertion, selection, update, and deletion
- Exception handling and resource management with try-with-resources
- Object-oriented principles via Employee model and service interfaces
- Console input handling with Java Scanner
com.employee_management_system/
β
βββ model/
β βββ Employee.java # Employee data model class
βββ service/
β βββ EmployeeService.java # Service interface for employee operations
β βββ impl/
β βββ EmployeeServiceImpl.java # Implementation of service using JDBC
βββ utility/
β βββ DBConnection.java # Utility class for Oracle DB connection
βββ Main.java # Application entry point with interactive menu
- The user interacts with a command-line menu to select operations.
- Operations invoke service methods that execute SQL queries on the Oracle database via JDBC.
- Results are fetched, updated, or deleted with real-time console feedback.
- Database connection is handled centrally in
DBConnectionutility class.
Employee Management System
- Add Employee
- Delete Employee
- Update Employee's Salary
- Get Employee Detail
- Get All Employee Details
- Exit Application
Which operation do you want to perform ( enter number between 1 to 6 )
-
Configure your Oracle database with the required
employeetable. -
Update database credentials in
DBConnection.java. -
Compile the project with: javac com/employee_management_system/**/*.java
-
Run the application: java com.employee_management_system.Main
Make sure Oracle JDBC driver is included in the classpath and you have JDK 17+ installed.
Avinash S.
Java Developer | FullβStack Enthusiast