Skip to content

Pranita1305/EmployeeServicesJava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Employee Management System (Java + MySQL)

Overview

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.

Features

  • 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

Technologies Used

  • Java
  • MySQL (for employee database)
  • JDBC (Java Database Connectivity)
  • Streams API for filtering operations
  • Logger API for logging sorted employees

Project Structure

EmployeeManagement β”œβ”€β”€ MainClass.java

Entry point of the program

β”œβ”€β”€ connectionClass.java # Manages database connections β”œβ”€β”€ Employee.java
# Employee model class β”œβ”€β”€ empServices.java
# Service class for CRUD operations β”œβ”€β”€ README.md
# Documentation file

Database Schema

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) );

Setup & Execution

Prerequisites

Ensure you have the following installed:

  • JDK (Java Development Kit)
  • MySQL Database
  • MySQL JDBC Driver (mysql-connector-j-9.2.0.jar)

Clone Repository

git clone (https://github.com/Pranita1305/EmployeeServicesJava) cd MainClass.java

Compile & Run

Compile the Java files with the MySQL Connector: javac -cp ".;mysql-connector-j-9.2.0.jar" *.java

Run the program:

java -cp ".;mysql-connector-j-9.2.0.jar" MainClass

Program Execution Example

=== Employee Management Menu ===

  1. Insert New Employees
  2. View All Employees
  3. View Sorted Employees by Name
  4. View Employees from Noida
  5. 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.

About

Basic program in java consisting of jdbc connectivity for various operations on an employee

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages