# hamzehalzurayqat/sql_data_wearhouse architecture

> Architecture diagram of the GitHub repository hamzehalzurayqat/sql_data_wearhouse, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hamzehalzurayqat/sql_data_wearhouse
- Repository: https://github.com/hamzehalzurayqat/sql_data_wearhouse

## Overview

This SQL Server warehouse turns CRM and ERP CSVs into analytics-ready Gold views through Bronze ingestion and Silver cleaning, normalization, deduplication, and business rules. Analysts use the Gold customer/product dimensions and sales fact for reporting; the EDA script explores the built Gold layer and its findings are summarized in a report. Relationships are based on README documentation only: no source excerpts were available to verify finer-grained SQL behavior.

Main entry points: [`scripts/gold/create_views`](https://github.com/hamzehalzurayqat/sql_data_wearhouse/blob/main/scripts/gold/create_views) (Gold analytical views), [`scripts/bronze/load_bronze.sql`](https://github.com/hamzehalzurayqat/sql_data_wearhouse/blob/main/scripts/bronze/load_bronze.sql) (Bronze loader), [`scripts/bronze/ddl_bronze.sql`](https://github.com/hamzehalzurayqat/sql_data_wearhouse/blob/main/scripts/bronze/ddl_bronze.sql) (Bronze tables), [`scripts/silver/load_silver.sql`](https://github.com/hamzehalzurayqat/sql_data_wearhouse/blob/main/scripts/silver/load_silver.sql) (Silver transformations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sources["Source data"]
  node_crm_csv["CRM CSVs"]
  node_erp_csv["ERP CSVs"]
end

subgraph group_warehouse["Warehouse layers"]
  node_bronze_loader["Bronze loader<br/>[load_bronze.sql]"]
  node_bronze_tables[("Bronze tables<br/>[ddl_bronze.sql]")]
  node_silver_loader["Silver transformations<br/>[load_silver.sql]"]
  node_silver_tables[("Silver layer")]
end

subgraph group_analytics["Analytics"]
  node_gold_views["Gold analytical views"]
  node_reporting["Business reporting"]
end

subgraph group_exploration["Exploratory analysis"]
  node_eda["Gold-layer exploration<br/>[EDA.sql]"]
  node_eda_report["EDA findings"]
end

node_analyst(("Analyst"))

node_crm_csv -->|"loads CSVs"| node_bronze_loader
node_erp_csv -->|"loads CSVs"| node_bronze_loader
node_bronze_loader -->|"loads raw data"| node_bronze_tables
node_bronze_tables -->|"transforms data"| node_silver_loader
node_silver_loader -->|"cleans and loads"| node_silver_tables
node_silver_tables -->|"curates views"| node_gold_views
node_analyst -->|"queries"| node_gold_views
node_gold_views -->|"supports analysis"| node_reporting
node_gold_views -->|"explores after build"| node_eda
node_eda -->|"summarizes findings"| node_eda_report

click node_crm_csv "https://github.com/hamzehalzurayqat/sql_data_wearhouse/tree/main/dataset/crm"
click node_erp_csv "https://github.com/hamzehalzurayqat/sql_data_wearhouse/tree/main/dataset/erp"
click node_bronze_loader "https://github.com/hamzehalzurayqat/sql_data_wearhouse/blob/main/scripts/bronze/load_bronze.sql"
click node_bronze_tables "https://github.com/hamzehalzurayqat/sql_data_wearhouse/blob/main/scripts/bronze/ddl_bronze.sql"
click node_silver_loader "https://github.com/hamzehalzurayqat/sql_data_wearhouse/blob/main/scripts/silver/load_silver.sql"
click node_silver_tables "https://github.com/hamzehalzurayqat/sql_data_wearhouse/blob/main/scripts/silver/ddl_silver_layer"
click node_gold_views "https://github.com/hamzehalzurayqat/sql_data_wearhouse/blob/main/scripts/gold/create_views"
click node_eda "https://github.com/hamzehalzurayqat/sql_data_wearhouse/blob/main/EDA/EDA.sql"
click node_eda_report "https://github.com/hamzehalzurayqat/sql_data_wearhouse/blob/main/Exploratory_Data_Analysis_(EDA)_Report.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_crm_csv,node_erp_csv toneBlue
class node_bronze_loader,node_bronze_tables,node_silver_loader,node_silver_tables toneAmber
class node_gold_views,node_reporting toneMint
class node_eda,node_eda_report toneRose
class node_analyst toneIndigo
```

## Components

### Source data

- [CRM CSVs](https://github.com/hamzehalzurayqat/sql_data_wearhouse/tree/main/dataset/crm): `dataset/crm`
- [ERP CSVs](https://github.com/hamzehalzurayqat/sql_data_wearhouse/tree/main/dataset/erp): `dataset/erp`

### Warehouse layers

- [Bronze loader](https://github.com/hamzehalzurayqat/sql_data_wearhouse/blob/main/scripts/bronze/load_bronze.sql): `scripts/bronze/load_bronze.sql`
- [Bronze tables](https://github.com/hamzehalzurayqat/sql_data_wearhouse/blob/main/scripts/bronze/ddl_bronze.sql): `scripts/bronze/ddl_bronze.sql`
- [Silver transformations](https://github.com/hamzehalzurayqat/sql_data_wearhouse/blob/main/scripts/silver/load_silver.sql): `scripts/silver/load_silver.sql`
- [Silver layer](https://github.com/hamzehalzurayqat/sql_data_wearhouse/blob/main/scripts/silver/ddl_silver_layer): `scripts/silver/ddl_silver_layer`

### Analytics

- [Gold analytical views](https://github.com/hamzehalzurayqat/sql_data_wearhouse/blob/main/scripts/gold/create_views): `scripts/gold/create_views`
- **Business reporting**

### Exploratory analysis

- [Gold-layer exploration](https://github.com/hamzehalzurayqat/sql_data_wearhouse/blob/main/EDA/EDA.sql): `EDA/EDA.sql`
- [EDA findings](https://github.com/hamzehalzurayqat/sql_data_wearhouse/blob/main/Exploratory_Data_Analysis_(EDA)_Report.md): `Exploratory_Data_Analysis_(EDA)_Report.md`

### Other components

- **Analyst**

## Connections

- CRM CSVs → Bronze loader: loads CSVs (evidence: `README.md`)
- ERP CSVs → Bronze loader: loads CSVs (evidence: `README.md`)
- Bronze loader → Bronze tables: loads raw data (evidence: `README.md`)
- Bronze tables → Silver transformations: transforms data (evidence: `README.md`)
- Silver transformations → Silver layer: cleans and loads (evidence: `README.md`)
- Silver layer → Gold analytical views: curates views (evidence: `README.md`)
- Analyst → Gold analytical views: queries (evidence: `README.md`)
- Gold analytical views → Business reporting: supports analysis (evidence: `README.md`)
- Gold analytical views → Gold-layer exploration: explores after build (evidence: `README.md`)
- Gold-layer exploration → EDA findings: summarizes findings (evidence: `README.md`)
