Skip to content

ShrutiiShinde05/Employee-Management-System

Repository files navigation

๐Ÿ“˜ Employee Management System using Java & MySQL


๐Ÿท๏ธ 1. Project Title

Employee Management System using Java and MySQL

๐Ÿ› ๏ธ Technology Stack

  • Frontend: Java Swing ๐Ÿ–ฅ๏ธ
  • Backend: MySQL ๐Ÿ—„๏ธ
  • Connectivity: JDBC ๐Ÿ”—
  • IDE: IntelliJ IDEA ๐Ÿ’ป

๐Ÿ“„ 2. Abstract

The Employee Management System is a database-driven application designed to efficiently manage employee records within an organization. It enables users to perform essential operations such as adding, updating, deleting, and viewing employee details.

This project demonstrates key Database Management System (DBMS) concepts including:

  • Normalization
  • Relationships
  • Triggers
  • Stored Procedures
  • Cursors

The system uses Java Swing for the graphical interface and MySQL as the backend database. Advanced SQL features enhance automation and efficiency:

  • ๐Ÿ” Triggers automatically log deleted records
  • โš™๏ธ Stored procedures handle multi-table insertion
  • ๐Ÿ”„ Cursors perform bulk salary updates

โœ… Outcome: A reliable system that reduces redundancy, ensures data integrity, and reflects real-world database applications.


๐Ÿ“š 3. Introduction

๐Ÿ”น Background

Manual management of employee data is inefficient and prone to errors. Organizations need automated systems for better accuracy and speed.

๐Ÿ”น Need of the System

  • Reduce manual work โณ
  • Avoid data redundancy ๐Ÿ“‰
  • Maintain data integrity ๐Ÿ”
  • Provide fast data access โšก

๐Ÿ”น Real-Life Applications

  • HR Management Systems ๐Ÿข
  • Employee Tracking Systems ๐Ÿ“Š
  • Payroll Systems ๐Ÿ’ฐ

๐Ÿ”น Scope

  • Add, update, delete employees
  • View employee records
  • Maintain structured database
  • Implement advanced DBMS concepts

๐Ÿ“‘ 4. Software Requirement Specification (SRS)

โœ… Functional Requirements

  • Add employee record
  • Update employee details
  • Delete employee record
  • View/Search employee data

โš™๏ธ Non-Functional Requirements

๐Ÿ”ธ Performance

  • Fast data retrieval using optimized SQL queries

๐Ÿ”ธ Security

  • Login authentication system ๐Ÿ”‘
  • Use of Prepared Statements (prevents SQL Injection)

๐Ÿ”ธ Usability

  • Simple and user-friendly GUI ๐ŸŽฏ

๐Ÿ’ป 4.1 Hardware & Software Requirements

Hardware:

  • Minimum 4GB RAM
  • Intel i3 or higher

Software:

  • OS: Windows 10/11
  • Frontend: Java Swing
  • Backend: MySQL
  • Tools: IntelliJ IDEA, MySQL Workbench

๐Ÿงฉ 5. Conceptual Design

๐Ÿ“Œ 5.1 ER Diagram

๐Ÿ‘‰ (Insert ER Diagram here)

๐Ÿ—ƒ๏ธ Relational Model

  • Employee(emp_id, name, fname, dob, phone, email, address)
  • Job(job_id, emp_id, designation, salary)
  • Education(edu_id, emp_id, education)
  • Login(username, password)
  • Employee_Log(log_id, emp_id, action, timestamp)

๐Ÿ”„ Normalization

1NF (First Normal Form)

  • All attributes are atomic
  • No repeating groups

2NF (Second Normal Form)

  • Removed partial dependency
  • Salary moved to Job table

3NF (Third Normal Form)

  • Removed transitive dependency
  • Education stored separately

โœ… Result: Reduced redundancy + Improved data integrity


๐Ÿš€ Advanced DBMS Concepts Used

โœ… Trigger

Automatically logs deleted employees:

CREATE TRIGGER after_employee_delete
AFTER DELETE ON employee
FOR EACH ROW
INSERT INTO employee_log(emp_id, action)
VALUES (OLD.emp_id, 'DELETED');

โœ… Stored Procedure

CALL add_employee(...);

๐Ÿ‘‰ Inserts data into multiple tables efficiently

โœ… Cursor

CALL increase_salary();

๐Ÿ‘‰ Updates salaries row-by-row


๐ŸŽจ 6. Graphical User Interface (GUI)

๐Ÿ” Login Page

  • Entry point of the system
  • Validates user credentials via database
  • Displays error for invalid login

๐Ÿ‘‰ Purpose: Authentication & Security


โž• Add Employee Form

  • Input fields: name, DOB, phone, email, salary, etc.
  • Uses stored procedure for insertion
  • Auto-generates Employee ID

๐Ÿ‘‰ Purpose:

  • Add new employee
  • Maintain normalized structure

๐Ÿ“Š View Employee

  • Displays records in tabular format
  • Uses SQL JOIN to combine multiple tables

๐Ÿ‘‰ Purpose:

  • Easy visualization
  • Complete employee details

โœ๏ธ Update Employee

  • Modify existing employee data
  • Uses SQL UPDATE queries

๐Ÿ‘‰ Purpose: Maintain accurate records


โŒ Remove Employee

  • Deletes employee using emp_id
  • Trigger logs deletion automatically

๐Ÿ‘‰ Purpose:

  • Data removal
  • Maintain transparency

๐Ÿ’ป 7. Source Code & Implementation

๐Ÿ”— Database Connection

Connection connection = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/db1", "root", "password");

๐Ÿ”„ CRUD Operations

โœ… Create (Insert)

  • Uses Stored Procedure
  • Inserts into multiple tables

โœ… Read (Retrieve)

  • Uses JOIN queries
  • Displays complete data

โœ… Update (Modify)

  • Uses PreparedStatement
  • Prevents SQL Injection

โœ… Delete (Remove)

  • Uses DELETE query
  • Trigger logs deletion

๐Ÿ”ฅ Bonus Features

Trigger

  • Logs deleted records automatically

Cursor

  • Bulk salary update

๐Ÿงช 8. Testing

Test Case Input Expected Output Status
Add Employee Valid Data Record Inserted โœ… Pass
Delete Employee emp_id Record Deleted + Log Created โœ… Pass
Increase Salary Procedure Salary Updated โœ… Pass

๐ŸŽฏ 9. Conclusion

The Employee Management System successfully demonstrates both basic and advanced DBMS concepts. The use of normalization ensures minimal redundancy and high data integrity.

Integration of Java (JDBC) with MySQL provides real-world application experience. Advanced features like triggers, stored procedures, and cursors enhance system performance and automation.


๐Ÿ”ฎ Future Scope

  • ๐ŸŒ Develop web-based interface
  • ๐Ÿ” Implement role-based authentication
  • ๐Ÿ’ฐ Add payroll system
  • โ˜๏ธ Use cloud database

โœจ Overall: This project is a complete, practical implementation of DBMS concepts with real-world relevance and strong technical foundation.

About

Employee Management System built using Java and MySQL with JDBC integration. It supports CRUD operations to add, update, delete, and view employee records. Designed with a user-friendly interface for efficient data management and streamlined administrative tasks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages