# nidhinjs/sql-data-warehouse-project architecture

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

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

## Overview

This is a SQL Server data warehouse portfolio project. Its documented workflow consolidates CRM and ERP CSVs into a Bronze raw-data layer, cleans and standardizes them in Silver, then models analytics-ready tables in Gold. The README also describes customer, product, and sales analysis, but no analytics query files or source excerpts were provided, so the graph stops at the Gold schema. Relationships shown are based on README statements; implementation-level calls and data mappings could not be verified.

Main entry points: [`scripts/bronze/proc_load_bronze.sql`](https://github.com/nidhinjs/sql-data-warehouse-project/blob/main/scripts/bronze/proc_load_bronze.sql) (Bronze Loading), [`scripts/silver/proc_load_silver.sql`](https://github.com/nidhinjs/sql-data-warehouse-project/blob/main/scripts/silver/proc_load_silver.sql) (Silver Transformations), [`scripts/gold/ddl_gold.sql`](https://github.com/nidhinjs/sql-data-warehouse-project/blob/main/scripts/gold/ddl_gold.sql) (Gold Star Schema), [`datasets/source_crm`](https://github.com/nidhinjs/sql-data-warehouse-project/tree/main/datasets/source_crm) (CRM CSVs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sources["Source Data"]
  node_crm["CRM CSVs"]
  node_erp["ERP CSVs"]
end

subgraph group_warehouse["Warehouse Layers"]
  node_database_setup["Database Setup<br/>[init_database.sql]"]
  node_bronze_tables["Bronze Tables<br/>[ddl_bronze.sql]"]
  node_bronze_load["Bronze Loading"]
  node_silver_tables["Silver Tables<br/>[ddl_silver.sql]"]
  node_silver_transform["Silver Transformations"]
end

subgraph group_analytics["Analytics Model"]
  node_gold_schema["Gold Star Schema<br/>[ddl_gold.sql]"]
end

node_sqlserver[("SQL Server")]

node_database_setup -->|"sets up"| node_sqlserver
node_bronze_tables -->|"defines tables"| node_sqlserver
node_bronze_load -->|"loads raw data"| node_sqlserver
node_crm -->|"imports CSVs"| node_bronze_load
node_erp -->|"imports CSVs"| node_bronze_load
node_silver_tables -->|"defines tables"| node_sqlserver
node_bronze_load -->|"cleans and standardizes"| node_silver_transform
node_silver_transform -->|"feeds analytics layer"| node_gold_schema
node_gold_schema -->|"defines tables"| node_sqlserver

click node_crm "https://github.com/nidhinjs/sql-data-warehouse-project/tree/main/datasets/source_crm"
click node_erp "https://github.com/nidhinjs/sql-data-warehouse-project/tree/main/datasets/source_erp"
click node_database_setup "https://github.com/nidhinjs/sql-data-warehouse-project/blob/main/scripts/init_database.sql"
click node_bronze_tables "https://github.com/nidhinjs/sql-data-warehouse-project/blob/main/scripts/bronze/ddl_bronze.sql"
click node_bronze_load "https://github.com/nidhinjs/sql-data-warehouse-project/blob/main/scripts/bronze/proc_load_bronze.sql"
click node_silver_tables "https://github.com/nidhinjs/sql-data-warehouse-project/blob/main/scripts/silver/ddl_silver.sql"
click node_silver_transform "https://github.com/nidhinjs/sql-data-warehouse-project/blob/main/scripts/silver/proc_load_silver.sql"
click node_gold_schema "https://github.com/nidhinjs/sql-data-warehouse-project/blob/main/scripts/gold/ddl_gold.sql"

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,node_erp toneBlue
class node_database_setup,node_bronze_tables,node_bronze_load,node_silver_tables,node_silver_transform,node_sqlserver toneAmber
class node_gold_schema toneMint
```

## Components

### Source Data

- [CRM CSVs](https://github.com/nidhinjs/sql-data-warehouse-project/tree/main/datasets/source_crm): `datasets/source_crm`
- [ERP CSVs](https://github.com/nidhinjs/sql-data-warehouse-project/tree/main/datasets/source_erp): `datasets/source_erp`

### Warehouse Layers

- [Database Setup](https://github.com/nidhinjs/sql-data-warehouse-project/blob/main/scripts/init_database.sql): `scripts/init_database.sql`
- [Bronze Tables](https://github.com/nidhinjs/sql-data-warehouse-project/blob/main/scripts/bronze/ddl_bronze.sql): `scripts/bronze/ddl_bronze.sql`
- [Bronze Loading](https://github.com/nidhinjs/sql-data-warehouse-project/blob/main/scripts/bronze/proc_load_bronze.sql): `scripts/bronze/proc_load_bronze.sql`
- [Silver Tables](https://github.com/nidhinjs/sql-data-warehouse-project/blob/main/scripts/silver/ddl_silver.sql): `scripts/silver/ddl_silver.sql`
- [Silver Transformations](https://github.com/nidhinjs/sql-data-warehouse-project/blob/main/scripts/silver/proc_load_silver.sql): `scripts/silver/proc_load_silver.sql`

### Analytics Model

- [Gold Star Schema](https://github.com/nidhinjs/sql-data-warehouse-project/blob/main/scripts/gold/ddl_gold.sql): `scripts/gold/ddl_gold.sql`

### Other components

- **SQL Server**

## Connections

- Database Setup → SQL Server: sets up (evidence: `README.md`)
- Bronze Tables → SQL Server: defines tables (evidence: `README.md`)
- Bronze Loading → SQL Server: loads raw data (evidence: `README.md`)
- CRM CSVs → Bronze Loading: imports CSVs (evidence: `README.md`)
- ERP CSVs → Bronze Loading: imports CSVs (evidence: `README.md`)
- Silver Tables → SQL Server: defines tables (evidence: `README.md`)
- Bronze Loading → Silver Transformations: cleans and standardizes (evidence: `README.md`)
- Silver Transformations → Gold Star Schema: feeds analytics layer (evidence: `README.md`)
- Gold Star Schema → SQL Server: defines tables (evidence: `README.md`)
