# bhavinthakor3067-spec/fitzone-gym architecture

> Architecture diagram of the GitHub repository bhavinthakor3067-spec/fitzone-gym, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bhavinthakor3067-spec/fitzone-gym
- Repository: https://github.com/bhavinthakor3067-spec/fitzone-gym

## Overview

FitZone is a PostgreSQL gym-management database project. Its main workflow is to create the relational schema, load location and domain data in the documented phase order, then run analytical queries against the populated database. The README also documents the ER model, relational mapping, and BCNF verification. No source excerpts were provided, so the relationships below rely on the README’s setup instructions and descriptions.

Main entry points: [`DDL_FOR_GYM.sql`](https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/DDL_FOR_GYM.sql) (Gym Schema), [`FitZone_Relational_Schema (1).pdf`](https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/FitZone_Relational_Schema%20(1).pdf) (Relational Mapping), [`DML_Phase1_Location.sql`](https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/DML_Phase1_Location.sql) (Location Data), [`DML_Phase2_Plan_Category_Equipment.sql`](https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/DML_Phase2_Plan_Category_Equipment.sql) (Plans & Equipment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_schema["Database Schema"]
  node_ddl["Gym Schema<br/>[DDL_FOR_GYM.sql]"]
end

subgraph group_seeding["Seed Data"]
  node_locations["Location Data"]
  node_plans_equipment["Plans &amp; Equipment"]
  node_people["People Data"]
  node_subscriptions["Items &amp; Memberships"]
  node_commerce["Sales &amp; Refunds"]
end

subgraph group_analytics["Analytics"]
  node_queries["Analytical Queries"]
end

subgraph group_design["Design Artifacts"]
  node_erd["ER Model"]
  node_relational["Relational Mapping"]
  node_bcnf["BCNF Verification"]
end

node_operator(("Database Operator"))
node_postgres[("PostgreSQL Database")]

node_operator -->|"runs schema"| node_ddl
node_ddl -->|"creates tables"| node_postgres
node_operator -->|"loads first"| node_locations
node_operator -->|"loads second"| node_plans_equipment
node_operator -->|"loads third"| node_people
node_operator -->|"loads fourth"| node_subscriptions
node_operator -->|"loads fifth"| node_commerce
node_locations -->|"seeds locations"| node_postgres
node_plans_equipment -->|"seeds plans"| node_postgres
node_people -->|"seeds people"| node_postgres
node_subscriptions -->|"seeds memberships"| node_postgres
node_commerce -->|"seeds transactions"| node_postgres
node_operator -->|"runs reports"| node_queries
node_queries -->|"queries data"| node_postgres
node_erd -->|"maps entities"| node_relational
node_relational -->|"informs schema"| node_ddl
node_bcnf -->|"verifies normalization"| node_relational

click node_ddl "https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/DDL_FOR_GYM.sql"
click node_locations "https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/DML_Phase1_Location.sql"
click node_plans_equipment "https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/DML_Phase2_Plan_Category_Equipment.sql"
click node_people "https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/DML_Phase3_People.sql"
click node_subscriptions "https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/DML_Phase4_Items_Buyers_Subscription_Attendance.sql"
click node_commerce "https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/DML_Phase5_Invoice_InvoiceDetails_Refund.sql"
click node_queries "https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/Complet_DQL_Script.sql"
click node_erd "https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/FitZone_ER_Diagram%20(1).pdf"
click node_relational "https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/FitZone_Relational_Schema%20(1).pdf"
click node_bcnf "https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/FitZone_BCNF_Report_Cleaned.pdf"

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_ddl toneBlue
class node_locations,node_plans_equipment,node_people,node_subscriptions,node_commerce,node_operator,node_postgres toneAmber
class node_queries toneMint
class node_erd,node_relational,node_bcnf toneRose
```

## Components

### Database Schema

- [Gym Schema](https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/DDL_FOR_GYM.sql): `DDL_FOR_GYM.sql`

### Seed Data

- [Location Data](https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/DML_Phase1_Location.sql): `DML_Phase1_Location.sql`
- [Plans & Equipment](https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/DML_Phase2_Plan_Category_Equipment.sql): `DML_Phase2_Plan_Category_Equipment.sql`
- [People Data](https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/DML_Phase3_People.sql): `DML_Phase3_People.sql`
- [Items & Memberships](https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/DML_Phase4_Items_Buyers_Subscription_Attendance.sql): `DML_Phase4_Items_Buyers_Subscription_Attendance.sql`
- [Sales & Refunds](https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/DML_Phase5_Invoice_InvoiceDetails_Refund.sql): `DML_Phase5_Invoice_InvoiceDetails_Refund.sql`

### Analytics

- [Analytical Queries](https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/Complet_DQL_Script.sql): `Complet_DQL_Script.sql`

### Design Artifacts

- [ER Model](https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/FitZone_ER_Diagram%20(1).pdf): `FitZone_ER_Diagram (1).pdf`
- [Relational Mapping](https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/FitZone_Relational_Schema%20(1).pdf): `FitZone_Relational_Schema (1).pdf`
- [BCNF Verification](https://github.com/bhavinthakor3067-spec/fitzone-gym/blob/main/FitZone_BCNF_Report_Cleaned.pdf): `FitZone_BCNF_Report_Cleaned.pdf`

### Other components

- **Database Operator**
- **PostgreSQL Database**

## Connections

- Database Operator → Gym Schema: runs schema (evidence: `README.md`)
- Gym Schema → PostgreSQL Database: creates tables (evidence: `README.md`)
- Database Operator → Location Data: loads first (evidence: `README.md`)
- Database Operator → Plans & Equipment: loads second (evidence: `README.md`)
- Database Operator → People Data: loads third (evidence: `README.md`)
- Database Operator → Items & Memberships: loads fourth (evidence: `README.md`)
- Database Operator → Sales & Refunds: loads fifth (evidence: `README.md`)
- Location Data → PostgreSQL Database: seeds locations (evidence: `README.md`)
- Plans & Equipment → PostgreSQL Database: seeds plans (evidence: `README.md`)
- People Data → PostgreSQL Database: seeds people (evidence: `README.md`)
- Items & Memberships → PostgreSQL Database: seeds memberships (evidence: `README.md`)
- Sales & Refunds → PostgreSQL Database: seeds transactions (evidence: `README.md`)
- Database Operator → Analytical Queries: runs reports (evidence: `README.md`)
- Analytical Queries → PostgreSQL Database: queries data (evidence: `README.md`)
- ER Model → Relational Mapping: maps entities (evidence: `README.md`)
- Relational Mapping → Gym Schema: informs schema (evidence: `README.md`)
- BCNF Verification → Relational Mapping: verifies normalization (evidence: `README.md`)
