Skip to content

Prog9s/Project_Company_Management_Database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Company Management Database System (SQL)

πŸ“Œ Project Overview

This project provides a comprehensive SQL script to create and manage a Company Database System. It covers essential business entities such as Employees, Departments, Training Courses, Instructors, and Leave Requests.

The database is designed with data integrity in mind, using primary keys, foreign keys, and various constraints (CHECK, UNIQUE, NOT NULL).

Blank diagram

πŸš€ Features

  • Database Schema: Complete structure for 5 core business tables.
  • Relationships: Fully established Foreign Key relationships.
  • Data Integrity: Implementation of business rules through SQL constraints.
  • Sample Data: Pre-loaded with initial data for testing and demonstration.
  • Analytical Queries: A collection of 15+ complex queries including Joins, Aggregations, Subqueries, and Grouping.

πŸ› οΈ Database Schema

The system consists of the following tables:

  1. Employees: Stores personal and salary information.
  2. Departments: Manages department names and manager assignments.
  3. Instructors: Details of trainers providing courses.
  4. TrainingCourses: Logs of available courses and their schedules.
  5. LeaveRequests: Tracks employee leave history and status (Pending/Approved/Rejected).

πŸ“Š Key Queries Included

The script includes advanced SQL scenarios such as:

  • Average salary per department.
  • Mapping instructors to courses.
  • Finding the highest-paid employee in each department.
  • Filtering employees based on department size using HAVING.
  • Tracking leave request statistics.

βš™οΈ How to Run

  1. Open SQL Server Management Studio (SSMS) or Azure Data Studio.
  2. Create a new query window.
  3. Copy and paste the content of Company_Database.sql.
  4. Execute (F5) to build the HR database and populate it with data.

πŸ‘€ Author

Sabah Hijazi

About

Project SQL (Company Management Database)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages