# vj220803/netflix_data_analysis architecture

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

- Interactive diagram: https://gitdiagram.com/vj220803/netflix_data_analysis
- Repository: https://github.com/vj220803/netflix_data_analysis

## Overview

##### Project Type and Purpose
- From the file tree and README, this is a standalone data-analysis pipeline built on PostgreSQL. There is no “frontend” web app or microservice; instead the workflow is: ingest raw CSV → load into a Postgres table → run SQL queries (via pgAdmin or psql) → produce business insights.
- The goal is exploratory data analysis (EDA) on the Netflix Movies & TV Shows CSV and to answer 17 business questions via SQL.

##### Main Architectural Components
a. Data Source
- The raw “Netflix Data.csv” file.
b. Ingestion / ETL Layer
- COPY or INSERT scripts that load the CSV into the Postgres “netflix” table.
- Any pre-processing (e.g., date parsing, array splitting).
c. Storage / Database Layer
- PostgreSQL 17.5 server instance.
- Single database with one main table (“netflix”).
d. Query & Analysis Layer
- SQL query engine (Postgres).
- Client: pgAdmin 4 (or psql) used to author and run queries.
e. Reporting / Visualization (optional)
- SQL result sets viewed in pgAdmin grids or exported to CSV for charts.

##### Architectural Patterns and Principles
- Logical separation of concerns:
- ETL (data load) vs. Storage vs. Analysis.
- Use of set-based SQL for EDA.
- Single source of truth in the relational database.
- No middle-tier or application server.

##### Relevant Technologies
- PostgreSQL 17.5 (storage + SQL engine)
- pgAdmin 4 (query client / UI)
- Standard SQL commands and window functions (e.g., RANK(), UNNEST).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Data Source
    CSV["Netflix Data.csv"]:::dataSource
    Docs["Project README.md"]:::doc

    %% ETL Layer
    ETL["ETL / COPY Script"]:::etl

    %% Storage Layer
    DB[(PostgreSQL DB)]:::storage

    %% Analysis Layer
    PGADMIN["pgAdmin Client"]:::analysis

    %% Export/Visualization
    EXPORT["Export / Visualization"]:::optional

    %% Data Flow
    CSV -->|“COPY FROM CSV”| ETL
    ETL -->|“INSERT INTO netflix table”| DB
    DB -->|“SQL Queries”| PGADMIN
    PGADMIN -->|“Export Results”| EXPORT

    %% Click Events
    click CSV "https://github.com/vj220803/netflix_data_analysis/blob/main/Netflix Data.csv"
    click Docs "https://github.com/vj220803/netflix_data_analysis/blob/main/README.md"

    %% Styles
    classDef dataSource fill:#BBDEFB,stroke:#333,stroke-width:1px
    classDef etl fill:#FFF9C4,stroke:#333,stroke-width:1px
    classDef storage fill:#C8E6C9,stroke:#333,stroke-width:1px
    classDef analysis fill:#FFE0B2,stroke:#333,stroke-width:1px
    classDef optional fill:#CFD8DC,stroke:#333,stroke-width:1px
    classDef doc fill:#E1BEE7,stroke:#333,stroke-width:1px
```
