DEV Community

Yogaraj
Yogaraj

Posted on

๐Ÿš€ Building My First SQL Project: Employee Attendance & Leave Management System

Over the past few weeks, Iโ€™ve been learning SQL and wanted to put that knowledge into practice by building a small project. To keep it simple but realistic, I decided to create an Employee Attendance & Leave Management System.

This project helped me understand how to design tables, insert real-looking values, and run queries that actually make sense in a workplace scenario

๐Ÿ“Œ Why This Project?

Almost every organization needs a way to track employees, their departments, attendance, and leaves. Instead of building a complex system, I focused on a simple yet practical database that covers:

๐Ÿ“‚ Project Setup

Database Name: EMP_DB

Number of Tables: 6 (Employees, Departments, Attendance, Leave, Projects, Salaries)

Tools Used: MySQL Workbench (you can use any SQL environment)
๐Ÿ›  Tables I Created

Hereโ€™s a quick overview of the tables:

Employees โ†’ stores employee details like ID, name, department.

Departments โ†’ keeps track of all departments.

Attendance โ†’ logs employee check-ins/check-outs.

Leave โ†’ records leave applications and approvals.

Projects โ†’ assigns employees to projects.

Salaries โ†’ salary details per employee.

๐Ÿ’พ Example Queries

Some queries I tried running:

Get employees with pending leaves.

Find the department with the most employees.

Check attendance percentage for each employee.

Show employees assigned to multiple projects.

These queries gave me confidence that my tables were connected properly with Primary Keys and Foreign Keys.

๐Ÿš€ What I Learned

How to design a database from scratch.

The importance of relationships between tables.

Writing queries that solve real use cases.

Using GitHub to host my project files.

๐Ÿ“Œ Project Repo

Iโ€™ve uploaded the SQL script and README file here:
๐Ÿ‘‰ https://github.com/yogaraj638/EMP_DB_Project

๐Ÿ”ฎ Next Steps

This was just a beginner project, but I plan to:

Add triggers/stored procedures.

Work with larger sample data.

Connect this database with a simple frontend (maybe in the future).

aws #cloudcomputing #sql #linux
๐Ÿ’ญ Got suggestions, feedback, or just want to say hi?

๐Ÿ“ฉ Reach me at: yogarajprof@gmail.com

Top comments (0)