# mouredev/hello-sql architecture

> Architecture diagram of the GitHub repository mouredev/hello-sql, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mouredev/hello-sql
- Repository: https://github.com/mouredev/hello-sql

## Overview

##### Project Type and Purpose
This is an educational project focused on teaching SQL fundamentals and relational databases, primarily using MySQL and PostgreSQL. The system design should reflect both the educational structure and the technical implementation.

##### Main Components

A. Learning Modules (Primary Structure):
- Reading Operations Module
- Writing Operations Module
- Database Management Module
- Table Operations Module
- Join Operations Module
- Advanced Features Module

B. Technical Components:
- Database Engines (MySQL/PostgreSQL)
- Code Examples Repository
- Connectors/Interfaces
- Educational Resources

**[Educational Layer]**

- [Content Organization]
- Basic Concepts
- CRUD Operations
- Database Management
- Advanced Features

**[Technical Layer]**

- [Database Systems]
- MySQL 8.0+
- PostgreSQL 16+

**[Implementation Layer]**

- [Code Examples]
- SQL Scripts
- Python Connectors

##### Implementation Details

- Use rectangles for main components
- Use diamonds for decision points
- Learning progression
- Data flow
- Dependencies
- Integration points

##### Additional Elements

- Version information for supported databases
- Connection points for different clients
- Where code examples are stored and how they relate to concepts

##### Specific Recommendations

- Educational flow
- Technical architecture
- Database implementation
- Code structure

- Learning modules
- Database operations
- Advanced features
- Implementation examples

Remember to emphasize the educational nature of the project while maintaining technical accuracy in the representation of database concepts and their implementations.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Educational
        LM[Learning Modules]
        CR[Content Resources]:::docs
        click CR "https://github.com/mouredev/hello-sql/blob/main/README.md"
        
        subgraph Modules
            RO["Reading Operations"]:::module
            click RO "https://github.com/mouredev/hello-sql/tree/main/01_Reading"
            WO["Writing Operations"]:::module
            click WO "https://github.com/mouredev/hello-sql/tree/main/02_Writing"
            DM["Database Management"]:::module
            click DM "https://github.com/mouredev/hello-sql/tree/main/03_Database"
            TO["Table Operations"]:::module
            click TO "https://github.com/mouredev/hello-sql/tree/main/04_Tables"
            JO["Join Operations"]:::module
            click JO "https://github.com/mouredev/hello-sql/tree/main/05_Join"
            AF["Advanced Features"]:::module
            click AF "https://github.com/mouredev/hello-sql/tree/main/06_Advanced"
        end
    end

    subgraph Implementation
        subgraph "Basic Operations"
            BC["Basic SQL Concepts"]:::code
            click BC "https://github.com/mouredev/hello-sql/blob/main/01_Reading/01_select.sql"
            
            subgraph "CRUD Operations"
                Create["Create Operations"]:::code
                click Create "https://github.com/mouredev/hello-sql/blob/main/02_Writing/01_insert.sql"
                Read["Read Operations"]:::code
                click Read "https://github.com/mouredev/hello-sql/blob/main/01_Reading/01_select.sql"
                Update["Update Operations"]:::code
                click Update "https://github.com/mouredev/hello-sql/blob/main/02_Writing/02_update.sql"
                Delete["Delete Operations"]:::code
                click Delete "https://github.com/mouredev/hello-sql/blob/main/02_Writing/03_delete.sql"
            end
        end

        subgraph "Advanced Implementation"
            Triggers["Triggers"]:::code
            click Triggers "https://github.com/mouredev/hello-sql/blob/main/06_Advanced/02_triggers.sql"
            Views["Views"]:::code
            click Views "https://github.com/mouredev/hello-sql/blob/main/06_Advanced/03_views.sql"
            StoredProc["Stored Procedures"]:::code
            click StoredProc "https://github.com/mouredev/hello-sql/blob/main/06_Advanced/04_stored_procedures.sql"
            Trans["Transactions"]:::code
            click Trans "https://github.com/mouredev/hello-sql/blob/main/06_Advanced/05_transactions.sql"
            Conn["Connectors/Interfaces"]:::code
            click Conn "https://github.com/mouredev/hello-sql/blob/main/06_Advanced/06_connectors.py"
        end
    end

    subgraph "Database Layer"
        MySQL["MySQL 8.0+"]:::db
        PostgreSQL["PostgreSQL 16+"]:::db
    end

    %% Relationships
    LM --> Modules
    RO --> BC
    WO --> Create & Update & Delete
    Read --> BC
    DM --> MySQL & PostgreSQL
    AF --> Triggers & Views & StoredProc & Trans & Conn
    Conn --> MySQL & PostgreSQL

    %% Styling
    classDef module fill:#a8d5ff,stroke:#333,stroke-width:2px
    classDef code fill:#ffe0b2,stroke:#333,stroke-width:2px
    classDef db fill:#b2dfdb,stroke:#333,stroke-width:2px
    classDef docs fill:#e1bee7,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        M1["Module"]:::module
        C1["Code Example"]:::code
        D1["Database"]:::db
        Doc1["Documentation"]:::docs
    end
```
