Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

💈 Barbershop SQL Database Project

📖 About the Project

This project represents a relational database for a barbershop management system. This project demonstrates practical SQL skills for data analysis and database design.

The database was designed and implemented from scratch using SQL Server. Synthetic data was generated to simulate real-world usage.

🎯 Objectives

  • Design relational database
  • Implement business logic using SQL
  • Optimize queries with indexes
  • Perform business analytics

🛠 Tech Stack

  • SQL Server
  • T-SQL

🔥 Project Highlights

  • Designed normalized relational database
  • Implemented many-to-many relationships
  • Created stored procedures for business logic
  • Used triggers for data validation
  • Built analytical queries for business insights

📂 Project Structure

  • schema/
  • data/
  • logic/
  • analytics/

🧱 Database Structure

Main entities:

  • Barbers
  • Clients
  • Services
  • Appointments
  • Visit Archive
  • Feedback

🗺 Database Schema

ERD

⚙️ Features

  • Primary & Foreign Keys
  • Stored Procedures
  • Views
  • Triggers
  • Indexes (filtered, include)

📊 Analytics

  • Top barbers by revenue
  • Most popular services
  • Average check
  • Customer retention
  • Workload analysis

🚀 How to Run

Run scripts in order:

  1. create_tables.sql
  2. indexes.sql
  3. insert_data.sql
  4. procedures.sql
  5. views.sql
  6. triggers.sql
  7. business_queries.sql

⚠️ Notes

  • Data is randomly generated

👨‍💻 Author

Dmytro

About

SQL database for barbershop management with business logic and analytics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages