# suleman-khokhar/home-maintenance-db architecture

> Architecture diagram of the GitHub repository suleman-khokhar/home-maintenance-db, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/suleman-khokhar/home-maintenance-db
- Repository: https://github.com/suleman-khokhar/home-maintenance-db

## Overview

This repository is a SQL Server data model for a home-maintenance booking platform. Its documented workflow is customer booking, service selection, technician assignment, and transaction tracking, with promotions and post-service feedback as supporting capabilities. The graph uses the README’s table/module descriptions and the listed SQL paths; source excerpts were not provided, so it does not infer implementation details or undocumented database relationships.

Main entry points: [`01_create_tables.sql`](https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql) (Booking)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_booking["Booking and Service"]
  node_customer["Customer"]
  node_booking_record["Booking"]
  node_booking_item["Booking Item"]
  node_service["Service"]
  node_service_category["Service Category"]
  node_city["City"]
end

subgraph group_workforce["Technician Management"]
  node_technician["Technician"]
  node_technician_skill["Technician Skill"]
  node_booking_assignment["Booking Assignment"]
end

subgraph group_transactions["Payments and Promotions"]
  node_payment["Payment"]
  node_payment_method["Payment Method"]
  node_promotion["Promotion"]
  node_booking_promotion["Booking Promotion"]
end

subgraph group_feedback["Customer Feedback"]
  node_review["Review"]
  node_complaint["Complaint"]
end

node_seed_data["Sample Data<br/>[02_insert_data.sql]"]
node_sql_queries["SQL Queries<br/>[03_queries.sql]"]
node_dashboard["Statistical Dashboard"]
node_customer_actor(("Customer"))

node_customer_actor -->|"registers"| node_customer
node_customer -->|"books"| node_booking_record
node_booking_record -->|"includes services"| node_booking_item
node_booking_item -->|"selects"| node_service
node_service -->|"categorized by"| node_service_category
node_booking_record -->|"has assignments"| node_booking_assignment
node_booking_assignment -->|"assigns"| node_technician
node_technician -->|"tracks skills"| node_technician_skill
node_booking_record -->|"tracks transactions"| node_payment
node_payment -->|"uses method types"| node_payment_method
node_booking_record -->|"applies promotions"| node_booking_promotion
node_booking_promotion -->|"tracks usage"| node_promotion
node_customer -->|"submits feedback"| node_review
node_customer -->|"files complaints"| node_complaint

click node_customer "https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql"
click node_booking_record "https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql"
click node_booking_item "https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql"
click node_service "https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql"
click node_service_category "https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql"
click node_city "https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql"
click node_technician "https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql"
click node_technician_skill "https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql"
click node_booking_assignment "https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql"
click node_payment "https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql"
click node_payment_method "https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql"
click node_promotion "https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql"
click node_booking_promotion "https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql"
click node_review "https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql"
click node_complaint "https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql"
click node_seed_data "https://github.com/suleman-khokhar/home-maintenance-db/blob/main/02_insert_data.sql"
click node_sql_queries "https://github.com/suleman-khokhar/home-maintenance-db/blob/main/03_queries.sql"
click node_dashboard "https://github.com/suleman-khokhar/home-maintenance-db/blob/main/docs/HMSMS_Statistical_Dashboard.html"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_customer,node_booking_record,node_booking_item,node_service,node_service_category,node_city toneBlue
class node_technician,node_technician_skill,node_booking_assignment toneAmber
class node_payment,node_payment_method,node_promotion,node_booking_promotion toneMint
class node_review,node_complaint toneRose
class node_seed_data,node_sql_queries,node_dashboard toneTeal
class node_customer_actor toneIndigo
```

## Components

### Booking and Service

- [Customer](https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql): `01_create_tables.sql`
- [Booking](https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql): `01_create_tables.sql`
- [Booking Item](https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql): `01_create_tables.sql`
- [Service](https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql): `01_create_tables.sql`
- [Service Category](https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql): `01_create_tables.sql`
- [City](https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql): `01_create_tables.sql`

### Technician Management

- [Technician](https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql): `01_create_tables.sql`
- [Technician Skill](https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql): `01_create_tables.sql`
- [Booking Assignment](https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql): `01_create_tables.sql`

### Payments and Promotions

- [Payment](https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql): `01_create_tables.sql`
- [Payment Method](https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql): `01_create_tables.sql`
- [Promotion](https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql): `01_create_tables.sql`
- [Booking Promotion](https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql): `01_create_tables.sql`

### Customer Feedback

- [Review](https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql): `01_create_tables.sql`
- [Complaint](https://github.com/suleman-khokhar/home-maintenance-db/blob/main/01_create_tables.sql): `01_create_tables.sql`

### Other components

- [Sample Data](https://github.com/suleman-khokhar/home-maintenance-db/blob/main/02_insert_data.sql): `02_insert_data.sql`
- [SQL Queries](https://github.com/suleman-khokhar/home-maintenance-db/blob/main/03_queries.sql): `03_queries.sql`
- [Statistical Dashboard](https://github.com/suleman-khokhar/home-maintenance-db/blob/main/docs/HMSMS_Statistical_Dashboard.html): `docs/HMSMS_Statistical_Dashboard.html`
- **Customer**

## Connections

- Customer → Customer: registers (evidence: `README.md`)
- Customer → Booking: books (evidence: `README.md`)
- Booking → Booking Item: includes services (evidence: `README.md`)
- Booking Item → Service: selects (evidence: `README.md`)
- Service → Service Category: categorized by (evidence: `README.md`)
- Booking → Booking Assignment: has assignments (evidence: `README.md`)
- Booking Assignment → Technician: assigns (evidence: `README.md`)
- Technician → Technician Skill: tracks skills (evidence: `README.md`)
- Booking → Payment: tracks transactions (evidence: `README.md`)
- Payment → Payment Method: uses method types (evidence: `README.md`)
- Booking → Booking Promotion: applies promotions (evidence: `README.md`)
- Booking Promotion → Promotion: tracks usage (evidence: `README.md`)
- Customer → Review: submits feedback (evidence: `README.md`)
- Customer → Complaint: files complaints (evidence: `README.md`)
