A MySQL-based Employee Management Database designed to demonstrate relational database design, historical HR data modeling, and analytical SQL techniques.
This project simulates an HR management system by storing employee records, department assignments, salary history, job titles, and managerial information. It includes a normalized schema, realistic sample data, and a collection of analytical SQL queries commonly used in business reporting.
| Metric | Value |
|---|---|
| Database | MySQL |
| Tables | 6 |
| Employees | 60 |
| Departments | 6 |
| Analytical Queries | 25+ |
| Normalization | Third Normal Form (3NF) |
- Normalized relational database design (3NF)
- Historical employee salary tracking
- Employee department history
- Department manager history
- Employee title history
- Primary & Foreign Keys
- Composite Keys
- Constraints
- Indexing
- Analytical SQL queries
The project consists of six relational tables.
| Table | Description |
|---|---|
| employees | Stores employee demographic and employment details |
| departments | Stores department information |
| employee_departments | Tracks employee department history |
| department_managers | Stores department manager assignments |
| salaries | Stores employee salary history |
| employee_titles | Stores employee title history |
- MySQL
- MySQL Workbench
- SQL
- Third Normal Form (3NF)
- Relational Modeling
- Primary Keys
- Foreign Keys
- Composite Keys
- Constraints
- Indexing
- SELECT
- WHERE
- ORDER BY
- GROUP BY
- HAVING
- Aggregate Functions
- INNER JOIN
- Subqueries
- Common Table Expressions (CTEs)
- Window Functions
Employee-Management-Database/
│
├── schema.sql
├── sample_data.sql
├── employee_queries.sql
├── README.md
│
├── erd/
│ └── employee_management_erd.png
│
└── screenshots/
├── 01_average_salary_by_department.png
├── 02_current_department_managers.png
├── 03_top_3_earners_by_department.png
├── 04_executive_dashboard.png
└── 05_salary_ranking.png
Run:
schema.sqlRun:
sample_data.sqlRun:
employee_queries.sqlThis project strengthened my understanding of:
- Relational Database Design
- Database Normalization
- SQL Query Optimization
- Business-Oriented SQL Analysis
- Window Functions
- Common Table Expressions
- HR Data Modeling
Potential enhancements include:
- SQL Views
- Stored Procedures
- Triggers
- User Roles & Permissions
- Power BI Dashboard Integration
Nishika Roy
GitHub: https://github.com/Royxnish





