# ivasteb/db_labs architecture

> Architecture diagram of the GitHub repository ivasteb/db_labs, 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/ivasteb/db_labs
- Repository: https://github.com/ivasteb/db_labs

## Overview

This repository documents a small database-design and implementation workflow for a houseplant, succulent, and terrarium shop. The DBML file describes the logical model; SQL scripts create and populate a local MySQL database. README documentation also describes publishing schema documentation to dbdocs. The tree and README support these relationships, but no source excerpts were provided, so implementation details beyond those statements are not inferred.

Main entry points: [`lab-work-1/schema.dbml`](https://github.com/ivasteb/db_labs/blob/main/lab-work-1/schema.dbml) (Logical schema), [`lab-work-2/1_create_schema.sql`](https://github.com/ivasteb/db_labs/blob/main/lab-work-2/1_create_schema.sql) (Create tables), [`lab-work-2/2_populate_data.sql`](https://github.com/ivasteb/db_labs/blob/main/lab-work-2/2_populate_data.sql) (Populate data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_design["Schema design"]
  node_dbml["Logical schema<br/>[schema.dbml]"]
end

subgraph group_database["Database implementation"]
  node_create["Create tables"]
  node_populate["Populate data"]
  node_mysql[("Local MySQL")]
end

subgraph group_publishing["Schema documentation"]
  node_dbdocs["dbdocs"]
end

node_dbml -->|"informs implementation"| node_create
node_create -->|"creates schema"| node_mysql
node_populate -->|"loads sample data"| node_mysql
node_dbml -->|"publishes documentation"| node_dbdocs

click node_dbml "https://github.com/ivasteb/db_labs/blob/main/lab-work-1/schema.dbml"
click node_create "https://github.com/ivasteb/db_labs/blob/main/lab-work-2/1_create_schema.sql"
click node_populate "https://github.com/ivasteb/db_labs/blob/main/lab-work-2/2_populate_data.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_dbml toneBlue
class node_create,node_populate,node_mysql toneAmber
class node_dbdocs toneMint
```

## Components

### Schema design

- [Logical schema](https://github.com/ivasteb/db_labs/blob/main/lab-work-1/schema.dbml): `lab-work-1/schema.dbml`

### Database implementation

- [Create tables](https://github.com/ivasteb/db_labs/blob/main/lab-work-2/1_create_schema.sql): `lab-work-2/1_create_schema.sql`
- [Populate data](https://github.com/ivasteb/db_labs/blob/main/lab-work-2/2_populate_data.sql): `lab-work-2/2_populate_data.sql`
- **Local MySQL**

### Schema documentation

- **dbdocs**

## Connections

- Logical schema → Create tables: informs implementation (evidence: `README.md`)
- Create tables → Local MySQL: creates schema (evidence: `README.md`)
- Populate data → Local MySQL: loads sample data (evidence: `README.md`)
- Logical schema → dbdocs: publishes documentation (evidence: `README.md`)
