# ali-hassan96/sql-data-warehouse-project architecture

> Architecture diagram of the GitHub repository ali-hassan96/sql-data-warehouse-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ali-hassan96/sql-data-warehouse-project
- Repository: https://github.com/ali-hassan96/sql-data-warehouse-project

## Overview

This repository describes a SQL Server sales warehouse: ERP and CRM CSV data is loaded into a Bronze layer, cleaned and standardized in Silver, then modeled in Gold for analytical reporting. The main user-to-result path is source data through those layers to SQL-based insights into customer behavior, product performance, and sales trends. The graph also includes the database initialization script and the dataset catalog. Source excerpts were unavailable, so relationships are limited to those documented in the README; reporting is a documented capability, not a sampled implementation.

Main entry points: [`scripts/bronze/proc_load_bronze.sql`](https://github.com/ali-hassan96/sql-data-warehouse-project/blob/main/scripts/bronze/proc_load_bronze.sql) (Bronze Loading), [`scripts/gold`](https://github.com/ali-hassan96/sql-data-warehouse-project/tree/main/scripts/gold) (SQL Analytics and Reporting), [`scripts/bronze/ddl_bronze.SQL`](https://github.com/ali-hassan96/sql-data-warehouse-project/blob/main/scripts/bronze/ddl_bronze.SQL) (Bronze Schema), [`scripts/silver/proc_load_silver.sql`](https://github.com/ali-hassan96/sql-data-warehouse-project/blob/main/scripts/silver/proc_load_silver.sql) (Silver Transformations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sources["Source Data"]
  node_erp_crm["ERP and CRM CSVs"]
end

subgraph group_warehouse["Warehouse Layers"]
  node_bronze_load["Bronze Loading"]
  node_bronze_schema["Bronze Schema<br/>[ddl_bronze.SQL]"]
  node_silver_load["Silver Transformations"]
  node_silver_schema["Silver Schema<br/>[ddl_silver.sql]"]
  node_gold_schema["Gold Model<br/>[ddl_gold.sql]"]
  node_sql_server[("SQL Server Warehouse")]
  node_db_init["Database Initialization<br/>[init_databse.sql]"]
end

subgraph group_analytics["Analytics and Reference"]
  node_reporting["SQL Analytics and Reporting"]
  node_catalog["Dataset Catalog<br/>[data_cataloge.md]"]
end

node_stakeholders(("Business Stakeholders"))

node_erp_crm -->|"loads CSVs"| node_bronze_load
node_bronze_load -->|"ingests raw data"| node_sql_server
node_bronze_schema -->|"defines Bronze"| node_sql_server
node_silver_load -->|"cleans and standardizes"| node_sql_server
node_silver_schema -->|"defines Silver"| node_sql_server
node_gold_schema -->|"defines Gold model"| node_sql_server
node_sql_server -->|"supports reporting"| node_reporting
node_reporting -->|"delivers insights"| node_stakeholders

click node_bronze_load "https://github.com/ali-hassan96/sql-data-warehouse-project/blob/main/scripts/bronze/proc_load_bronze.sql"
click node_bronze_schema "https://github.com/ali-hassan96/sql-data-warehouse-project/blob/main/scripts/bronze/ddl_bronze.SQL"
click node_silver_load "https://github.com/ali-hassan96/sql-data-warehouse-project/blob/main/scripts/silver/proc_load_silver.sql"
click node_silver_schema "https://github.com/ali-hassan96/sql-data-warehouse-project/blob/main/scripts/silver/ddl_silver.sql"
click node_gold_schema "https://github.com/ali-hassan96/sql-data-warehouse-project/blob/main/scripts/gold/ddl_gold.sql"
click node_db_init "https://github.com/ali-hassan96/sql-data-warehouse-project/blob/main/scripts/init_databse.sql"
click node_reporting "https://github.com/ali-hassan96/sql-data-warehouse-project/tree/main/scripts/gold"
click node_catalog "https://github.com/ali-hassan96/sql-data-warehouse-project/blob/main/docs/data_cataloge.md"

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_erp_crm toneBlue
class node_bronze_load,node_bronze_schema,node_silver_load,node_silver_schema,node_gold_schema,node_sql_server,node_db_init toneAmber
class node_reporting,node_catalog toneMint
class node_stakeholders toneIndigo
```

## Components

### Source Data

- **ERP and CRM CSVs**

### Warehouse Layers

- [Bronze Loading](https://github.com/ali-hassan96/sql-data-warehouse-project/blob/main/scripts/bronze/proc_load_bronze.sql): `scripts/bronze/proc_load_bronze.sql`
- [Bronze Schema](https://github.com/ali-hassan96/sql-data-warehouse-project/blob/main/scripts/bronze/ddl_bronze.SQL): `scripts/bronze/ddl_bronze.SQL`
- [Silver Transformations](https://github.com/ali-hassan96/sql-data-warehouse-project/blob/main/scripts/silver/proc_load_silver.sql): `scripts/silver/proc_load_silver.sql`
- [Silver Schema](https://github.com/ali-hassan96/sql-data-warehouse-project/blob/main/scripts/silver/ddl_silver.sql): `scripts/silver/ddl_silver.sql`
- [Gold Model](https://github.com/ali-hassan96/sql-data-warehouse-project/blob/main/scripts/gold/ddl_gold.sql): `scripts/gold/ddl_gold.sql`
- **SQL Server Warehouse**
- [Database Initialization](https://github.com/ali-hassan96/sql-data-warehouse-project/blob/main/scripts/init_databse.sql): `scripts/init_databse.sql`

### Analytics and Reference

- [SQL Analytics and Reporting](https://github.com/ali-hassan96/sql-data-warehouse-project/tree/main/scripts/gold): `scripts/gold`
- [Dataset Catalog](https://github.com/ali-hassan96/sql-data-warehouse-project/blob/main/docs/data_cataloge.md): `docs/data_cataloge.md`

### Other components

- **Business Stakeholders**

## Connections

- ERP and CRM CSVs → Bronze Loading: loads CSVs (evidence: `README.md`)
- Bronze Loading → SQL Server Warehouse: ingests raw data (evidence: `README.md`)
- Bronze Schema → SQL Server Warehouse: defines Bronze (evidence: `README.md`)
- Silver Transformations → SQL Server Warehouse: cleans and standardizes (evidence: `README.md`)
- Silver Schema → SQL Server Warehouse: defines Silver (evidence: `README.md`)
- Gold Model → SQL Server Warehouse: defines Gold model (evidence: `README.md`)
- SQL Server Warehouse → SQL Analytics and Reporting: supports reporting (evidence: `README.md`)
- SQL Analytics and Reporting → Business Stakeholders: delivers insights (evidence: `README.md`)
