# alyrraza/covid-data-exploration-sql architecture

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

- Interactive diagram: https://gitdiagram.com/alyrraza/covid-data-exploration-sql
- Repository: https://github.com/alyrraza/covid-data-exploration-sql

## Overview

##### Project type and purpose
- This is a data‐exploration/ETL project centered on COVID-19 data.
- It ingests raw CSVs, builds relational tables via SQL DDL scripts, runs analytical SQL queries, and exports results to CSV for further inspection.

##### File structure
- Top-level files:
- CovidVacinations.csv & CovidDeaths.csv – raw input data
- Table Creation.sql – DDL statements to create tables and load the CSVs
- Data Exploration.sql – collection of analytical queries (Query 1 through Query 6)
- Query 7 output.csv – sample of a more complex query’s output
- README.md – documentation of queries and intent
- .vscode – IDE/editor configuration
- There is no frontend or backend service—this is purely a data‐processing pipeline.

##### README for additional insights
- The README describes each query’s goal, tables involved, and a window‐function example for cumulative sums.
- No external services or microservices are referenced.

##### Essential details to capture
- Exact file/script names and their roles
- The join and window‐function logic in Query 7 as a sub-component of the analytics stage
- The fact that all artifacts live locally in VSCode/GitHub rather than in a cloud service
- Potential extensibility: e.g., adding a scheduler or a BI tool on top of the output CSVs

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Ingestion Layer
    subgraph "Ingestion Layer"
        Vaccinations["CovidVaccinations.csv"]:::data
        Deaths["CovidDeaths.csv"]:::data
        ETL["Table Creation.sql (ETL)"]:::process
    end

    %% Storage Layer
    subgraph "Storage Layer"
        DB[(Relational Database)]:::data
    end

    %% Analytics Layer
    subgraph "Analytics Layer"
        Analytics["Data Exploration.sql (Queries 1–6)"]:::process
        Q7["Query 7 Processor<br/>(Window Function + Join)"]:::process
    end

    %% Presentation Layer
    subgraph "Presentation Layer"
        Q7Out["Query 7 output.csv"]:::output
    end

    %% Documentation & Config
    Doc["README.md"]:::doc
    Config[".vscode"]:::config

    %% Data Flow
    Vaccinations --> ETL
    Deaths --> ETL
    ETL --> DB
    DB --> Analytics
    DB --> Q7
    Q7 --> Q7Out

    %% Click Events
    click Vaccinations "https://github.com/alyrraza/covid-data-exploration-sql/blob/main/CovidVaccinations.csv"
    click Deaths "https://github.com/alyrraza/covid-data-exploration-sql/blob/main/CovidDeaths.csv"
    click ETL "https://github.com/alyrraza/covid-data-exploration-sql/blob/main/Table Creation.sql"
    click Analytics "https://github.com/alyrraza/covid-data-exploration-sql/blob/main/Data Exploration.sql"
    click Q7Out "https://github.com/alyrraza/covid-data-exploration-sql/blob/main/Query 7 output.csv"
    click Doc "https://github.com/alyrraza/covid-data-exploration-sql/blob/main/README.md"
    click Config "https://github.com/alyrraza/covid-data-exploration-sql/blob/main/.vscode"

    %% Styles
    classDef data fill:#c8e6c9,stroke:#2e7d32,color:#2e7d32,stroke-width:1px;
    classDef process fill:#bbdefb,stroke:#1565c0,color:#1565c0,stroke-width:1px;
    classDef output fill:#ffe0b2,stroke:#ef6c00,color:#e65100,stroke-width:1px;
    classDef doc fill:#eeeeee,stroke:#757575,color:#424242,stroke-width:1px;
    classDef config fill:#f3e5f5,stroke:#6a1b9a,color:#4a148c,stroke-width:1px;
```
