# manyampulendra/mysql-database-design-demonstration architecture

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

- Interactive diagram: https://gitdiagram.com/manyampulendra/mysql-database-design-demonstration
- Repository: https://github.com/manyampulendra/mysql-database-design-demonstration

## Overview

This is a MySQL learning/demo project, not an application service: its workflow is to create and populate a retail database, then run seven example queries for customer, inventory, sales, shipping, and product analytics. The README documents the schema and query purposes, but no SQL excerpts were provided, so relationships are limited to those documented there.

Main entry points: [`online retail (database).sql`](https://github.com/manyampulendra/mysql-database-design-demonstration/blob/main/online%20retail%20(database).sql) (Retail database), [`q1.sql`](https://github.com/manyampulendra/mysql-database-design-demonstration/blob/main/q1.sql) (Customer orders), [`q2.sql`](https://github.com/manyampulendra/mysql-database-design-demonstration/blob/main/q2.sql) (Stock check), [`q3.sql`](https://github.com/manyampulendra/mysql-database-design-demonstration/blob/main/q3.sql) (Product sales)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Database setup"]
  node_retail_db[("Retail database")]
end

subgraph group_analytics["Retail analytics"]
  node_q1["Customer orders<br/>[q1.sql]"]
  node_q2["Stock check<br/>[q2.sql]"]
  node_q3["Product sales<br/>[q3.sql]"]
  node_q4["Top spender<br/>[q4.sql]"]
  node_q5["Shipping status<br/>[q5.sql]"]
  node_q6["Product order counts<br/>[q6.sql]"]
  node_q7["Popular category<br/>[q7.sql]"]
end

node_operator(("SQL user"))

node_operator -->|"creates and populates"| node_retail_db
node_operator -->|"runs query"| node_q1
node_operator -->|"runs query"| node_q2
node_operator -->|"runs query"| node_q3
node_operator -->|"runs query"| node_q4
node_operator -->|"runs query"| node_q5
node_operator -->|"runs query"| node_q6
node_operator -->|"runs query"| node_q7
node_q1 -->|"queries"| node_retail_db
node_q2 -->|"queries"| node_retail_db
node_q3 -->|"queries"| node_retail_db
node_q4 -->|"queries"| node_retail_db
node_q5 -->|"queries"| node_retail_db
node_q6 -->|"queries"| node_retail_db
node_q7 -->|"queries"| node_retail_db

click node_retail_db "https://github.com/manyampulendra/mysql-database-design-demonstration/blob/main/online%20retail%20(database).sql"
click node_q1 "https://github.com/manyampulendra/mysql-database-design-demonstration/blob/main/q1.sql"
click node_q2 "https://github.com/manyampulendra/mysql-database-design-demonstration/blob/main/q2.sql"
click node_q3 "https://github.com/manyampulendra/mysql-database-design-demonstration/blob/main/q3.sql"
click node_q4 "https://github.com/manyampulendra/mysql-database-design-demonstration/blob/main/q4.sql"
click node_q5 "https://github.com/manyampulendra/mysql-database-design-demonstration/blob/main/q5.sql"
click node_q6 "https://github.com/manyampulendra/mysql-database-design-demonstration/blob/main/q6.sql"
click node_q7 "https://github.com/manyampulendra/mysql-database-design-demonstration/blob/main/q7.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_retail_db,node_operator toneBlue
class node_q1,node_q2,node_q3,node_q4,node_q5,node_q6,node_q7 toneAmber
```

## Components

### Database setup

- [Retail database](https://github.com/manyampulendra/mysql-database-design-demonstration/blob/main/online%20retail%20(database).sql): `online retail (database).sql`

### Retail analytics

- [Customer orders](https://github.com/manyampulendra/mysql-database-design-demonstration/blob/main/q1.sql): `q1.sql`
- [Stock check](https://github.com/manyampulendra/mysql-database-design-demonstration/blob/main/q2.sql): `q2.sql`
- [Product sales](https://github.com/manyampulendra/mysql-database-design-demonstration/blob/main/q3.sql): `q3.sql`
- [Top spender](https://github.com/manyampulendra/mysql-database-design-demonstration/blob/main/q4.sql): `q4.sql`
- [Shipping status](https://github.com/manyampulendra/mysql-database-design-demonstration/blob/main/q5.sql): `q5.sql`
- [Product order counts](https://github.com/manyampulendra/mysql-database-design-demonstration/blob/main/q6.sql): `q6.sql`
- [Popular category](https://github.com/manyampulendra/mysql-database-design-demonstration/blob/main/q7.sql): `q7.sql`

### Other components

- **SQL user**

## Connections

- SQL user → Retail database: creates and populates (evidence: `README.md`)
- SQL user → Customer orders: runs query (evidence: `README.md`)
- SQL user → Stock check: runs query (evidence: `README.md`)
- SQL user → Product sales: runs query (evidence: `README.md`)
- SQL user → Top spender: runs query (evidence: `README.md`)
- SQL user → Shipping status: runs query (evidence: `README.md`)
- SQL user → Product order counts: runs query (evidence: `README.md`)
- SQL user → Popular category: runs query (evidence: `README.md`)
- Customer orders → Retail database: queries (evidence: `README.md`)
- Stock check → Retail database: queries (evidence: `README.md`)
- Product sales → Retail database: queries (evidence: `README.md`)
- Top spender → Retail database: queries (evidence: `README.md`)
- Shipping status → Retail database: queries (evidence: `README.md`)
- Product order counts → Retail database: queries (evidence: `README.md`)
- Popular category → Retail database: queries (evidence: `README.md`)
