Dbms Innovative
Dbms Innovative
A Project Report On
Employee MANAGEMENT SYSTEM
PREPARED BY :
Name :- Solanki Manan
Roll No. :- 23BCE329
Batch :- F1
Name :- Harshil Zalawadiya
Roll no.:- 23BCE385
Batch :- F4
Introduction
The Employee Management System (EMS) is a database-driven
application designed to automate HR processes, manage employee records,
track attendance, process payroll, and evaluate performance. This system
replaces manual record-keeping with a structured relational database that
ensures data integrity, security, and quick retrieval.
Relational Schema:
• employee (emp_id, name, dob, contact, email, dept_id, position_id,
hire_date)
• department (dept_id, dept_name, manager_id, location)
• position (position_id, title, base_salary, benefits)
• attendance (attendance_id, emp_id, date, status, hours_worked)
• salary (salary_id, emp_id, month, year, basic, allowances, deductions,
net_salary)
• performance (review_id, emp_id, date, rating, comments)
1. department Table
Purpose: Stores information about different departments in an organization.
Why?
• Ensures proper employee categorization
• Helps in organizational hierarchy management
• Used for reporting (e.g., department-wise salary expenses)
Fields:
• dept_id (Primary Key) – Unique department identifier
• dept_name – Name of the department (e.g., HR, IT, Finance)
• manager_id (Foreign Key) – References employee.emp_id (who manages
the department)
• location – Physical location of the department
2. employee Table
Purpose: Stores personal and professional details of employees.
Why?
• Centralized storage of employee data
• Links employees to their departments and positions
• Used in payroll, attendance, and performance tracking
Fields:
• emp_id (Primary Key) – Unique employee ID
• name – Full name of the employee
• dob – Date of birth
• contact – Phone number
• email – Official email
• dept_id (Foreign Key) – References department.dept_id
• position_id (Foreign Key) – References position.position_id
• hire_date – Date of joining
3. position Table
Purpose: Defines job roles, salaries, and benefits.
Why?
• Standardizes job titles and compensation
• Helps in payroll calculations
• Used for promotions and role changes
Fields:
• position_id (Primary Key) – Unique role identifier
• title – Job title (e.g., "Software Engineer," "HR Manager")
• base_salary – Basic salary for the role
• benefits – Additional perks (e.g., health insurance, bonuses)
4. attendance Table
Purpose: Tracks employee attendance and working hours.
Why?
• Monitors employee presence/absence
• Used for payroll deductions (late arrivals, unpaid leaves)
• Helps in productivity analysis
Fields:
• attendance_id (Primary Key) – Unique attendance record
• emp_id (Foreign Key) – References employee.emp_id
• date – Date of attendance
• status – Present / Absent / On Leave / Half-Day
• hours_worked – Total working hours
5. salary Table
Purpose: Manages salary calculations, deductions, and payments.
Why?
• Automates payroll processing
• Tracks salary components (basic, allowances, deductions)
• Generates payslips and tax reports
Fields:
• salary_id (Primary Key) – Unique salary record
• emp_id (Foreign Key) – References employee.emp_id
• month & year – Salary period
• basic – Base salary
• allowances (HRA, DA, bonuses)
• deductions (Tax, PF, loans)
• net_salary – Final credited amount
6. performance Table
Purpose: Stores employee performance reviews and ratings.
Why?
• Tracks employee growth and productivity
• Used for promotions and appraisals
• Helps in training and development planning
Fields:
• review_id (Primary Key) – Unique performance review ID
• emp_id (Foreign Key) – References employee.emp_id
• date – Review date
• rating (1-5 scale) – Performance score
• comments – Manager’s feedback
The database follows a relational model, meaning tables are linked via foreign
keys to avoid data redundancy and ensure consistency.
Example Workflow:
1. New Employee Joins → Added to employee table
with dept_id and position_id.
2. Attendance Marked Daily → Recorded in attendance table.
3. Salary Processed Monthly → Calculated in salary table based on
attendance and position.
4. Performance Reviewed Quarterly → Stored in performance table.
Key Relationships:
Employee Table:-
CREATE TABLE employee (
dob DATE,
contact VARCHAR(15),
email VARCHAR(50),
dept_id VARCHAR(10),
position_id VARCHAR(10),
hire_date DATE,
);
Department Table:-
CREATE TABLE department (
manager_id VARCHAR(10),
location VARCHAR(50)
);
Position Table:-
CREATE TABLE position (
position_id VARCHAR(10) PRIMARY KEY,
title VARCHAR(50) NOT NULL,
base_salary DECIMAL(10,2),
benefits VARCHAR(100)
);
Attendance Table
Salary Table
Performance Table:-
DATA INSERTION:-
INSERT INTO employee (emp_id, name, dob, contact, email, dept_id, position_id, hire_date) VALUES
('E001', 'John Smith', '1985-03-15', '5551234567', '[email protected]', 'D001', 'P001', '2018-
06-10'),
('E002', 'Sarah Johnson', '1990-07-22', '5552345678', '[email protected]', 'D002', 'P002', '2019-
02-15'),
('E003', 'Michael Brown', '1988-11-05', '5553456789', '[email protected]', 'D003', 'P003',
'2017-09-20'),
('E004', 'Emily Davis', '1992-04-30', '5554567890', '[email protected]', 'D004', 'P004', '2020-01-
05'),
('E005', 'Robert Wilson', '1983-09-18', '5555678901', '[email protected]', 'D001', 'P001',
'2015-03-12');
INSERT INTO salary (salary_id, emp_id, month, year, basic, allowances, deductions, net_salary)
VALUES
('S001', 'E001', 6, 2023, 75000.00, 5000.00, 12000.00, 68000.00),
('S002', 'E002', 6, 2023, 65000.00, 3000.00, 9500.00, 58500.00),
('S003', 'E003', 6, 2023, 70000.00, 4000.00, 11000.00, 63000.00),
('S004', 'E004', 6, 2023, 60000.00, 2000.00, 8500.00, 53500.00),
('S005', 'E005', 6, 2023, 80000.00, 6000.00, 14000.00, 72000.00);
Employee
Department
Position
Attendance
Salary
Performance
SQL QURIES
Department headcount:
SELECT d.dept_name, COUNT(e.emp_id) AS employee_count
FROM department d
LEFT JOIN employee e ON d.dept_id = e.dept_id
GROUP BY d.dept_name;
SQL TRIGGERS FOR EMPLOYEE
Key Achievements
Automated HR Processes:
• Salary calculations, probation tracking, and leave management are now fully automated.
• Reduced manual errors and improved efficiency in payroll and attendance systems.
NORMALIZATION:-
employee (2NF)
emp_id name dept_id
E001 John Smith D001
department (2NF)
dept_id dept_name
D001 HR