This project is a console-based Employee Management System built using Java and MySQL. It allows users to add, view, sort, and filter employees based on various criteria. The system utilizes JDBC for database interaction.
- Insert new employees into the database
- View all employees
- View employees sorted by name
- View employees located in Noida
- Efficient database operations using JDBC
- Usage of Streams API for filtering employees
- Comparator sorting for employees by name
- Java
- MySQL (for employee database)
- JDBC (Java Database Connectivity)
- Streams API for filtering operations
- Logger API for logging sorted employees
EmployeeManagement βββ MainClass.java
βββ connectionClass.java
# Manages database connections
βββ Employee.java
# Employee model class
βββ empServices.java
# Service class for CRUD operations
βββ README.md
# Documentation file
The system uses a table named employe, which has the following fields:
CREATE TABLE employe ( emp_id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255), age INT, dept VARCHAR(100), location VARCHAR(100) );
Ensure you have the following installed:
- JDK (Java Development Kit)
- MySQL Database
- MySQL JDBC Driver (
mysql-connector-j-9.2.0.jar)
git clone (https://github.com/Pranita1305/EmployeeServicesJava) cd MainClass.java
Compile the Java files with the MySQL Connector: javac -cp ".;mysql-connector-j-9.2.0.jar" *.java
java -cp ".;mysql-connector-j-9.2.0.jar" MainClass
=== Employee Management Menu ===
- Insert New Employees
- View All Employees
- View Sorted Employees by Name
- View Employees from Noida
- Exit Enter your choice (1-5):
Contributions Feel free to fork this repository, suggest improvements, or report issues! π License This project is MIT licensed. Feel free to use and modify as needed.