# abhishek6002/sql-information-extraction architecture

> Architecture diagram of the GitHub repository abhishek6002/sql-information-extraction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abhishek6002/sql-information-extraction
- Repository: https://github.com/abhishek6002/sql-information-extraction

## Overview

A small command-line utility: a user supplies a SQL file, the script reads it, extracts stored-procedure names and parameters, builds structured data, and writes a sibling JSON file. The runtime is implemented in one script; the graph separates its stages for clarity. Relationships are supported by the script and README; no unsampled implementation is assumed.

Main entry points: [`extraction.py`](https://github.com/abhishek6002/sql-information-extraction/blob/main/extraction.py) (CLI Validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_sql_input["SQL Input"]
node_cli["CLI Validation<br/>[extraction.py]"]
node_reader["SQL Reader<br/>[extraction.py]"]
node_parser["Procedure Parser<br/>[extraction.py]"]
node_builder["JSON Data Builder<br/>[extraction.py]"]
node_writer["JSON Writer<br/>[extraction.py]"]
node_json_output["JSON Output"]

node_user -->|"supplies filename"| node_cli
node_cli -->|"validates file"| node_sql_input
node_cli -->|"reads contents"| node_reader
node_reader -->|"passes SQL text"| node_parser
node_parser -->|"extracts parameters"| node_builder
node_builder -->|"provides data"| node_writer
node_writer -->|"writes JSON"| node_json_output

click node_cli "https://github.com/abhishek6002/sql-information-extraction/blob/main/extraction.py"
click node_reader "https://github.com/abhishek6002/sql-information-extraction/blob/main/extraction.py"
click node_parser "https://github.com/abhishek6002/sql-information-extraction/blob/main/extraction.py"
click node_builder "https://github.com/abhishek6002/sql-information-extraction/blob/main/extraction.py"
click node_writer "https://github.com/abhishek6002/sql-information-extraction/blob/main/extraction.py"

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_user toneBlue
class node_sql_input,node_json_output toneIndigo
class node_cli,node_reader,node_parser,node_builder,node_writer toneTeal
```

## Components

### Other components

- **User**
- **SQL Input**
- [CLI Validation](https://github.com/abhishek6002/sql-information-extraction/blob/main/extraction.py): `extraction.py`
- [SQL Reader](https://github.com/abhishek6002/sql-information-extraction/blob/main/extraction.py): `extraction.py`
- [Procedure Parser](https://github.com/abhishek6002/sql-information-extraction/blob/main/extraction.py): `extraction.py`
- [JSON Data Builder](https://github.com/abhishek6002/sql-information-extraction/blob/main/extraction.py): `extraction.py`
- [JSON Writer](https://github.com/abhishek6002/sql-information-extraction/blob/main/extraction.py): `extraction.py`
- **JSON Output**

## Connections

- User → CLI Validation: supplies filename (evidence: `README.md`)
- CLI Validation → SQL Input: validates file (evidence: `extraction.py`)
- CLI Validation → SQL Reader: reads contents (evidence: `extraction.py`)
- SQL Reader → Procedure Parser: passes SQL text (evidence: `extraction.py`)
- Procedure Parser → JSON Data Builder: extracts parameters (evidence: `extraction.py`)
- JSON Data Builder → JSON Writer: provides data (evidence: `extraction.py`)
- JSON Writer → JSON Output: writes JSON (evidence: `extraction.py`)
