How sitser0/flight-base works
This repository is an airline-flight database project. Its main workflow is to create a local PostgreSQL schema, populate it through one of three routes (synthetic data, Aviationstack flight data, or airport CSV data), then use the SQL request collection; a separate directory contains database views. The sampled loaders reveal airline, aircraft, airport, flight, passenger, ticket, baggage, and flight-status data. SQL definitions and queries were not sampled, so their internal behavior is not expanded here.
Main entry points: inserts_flights.py API loader · inserting_airports.py CSV loader · builder.sql Schema builder · random_insert.py Synthetic loader
Components 17
Database schema
- Schema builder
scripts/builder.sql - PostgreSQL database
Data ingestion
- Synthetic loader
scripts/random_insert.py - API loader
scripts/inserts_flights.py - Airport CSV
scripts/apinfo.csv - CSV loader
scripts/inserting_airports.py
Flight data
- Airlines
scripts/random_insert.py - Aircraft
scripts/random_insert.py - Airports
scripts/random_insert.py - Flights
scripts/random_insert.py - Passengers
scripts/random_insert.py - Tickets and baggage
scripts/random_insert.py - Flight status history
scripts/random_insert.py
SQL access
- SQL requests
requests - Database views
Представления
Other components
- Operator
- Aviationstack API
Connections 12
- Operator → Schema builder: runs
README.md - Schema builder → PostgreSQL database: creates schema
README.md - Operator → Synthetic loader: runs
README.md - Synthetic loader → PostgreSQL database: inserts data
scripts/random_insert.py - Operator → API loader: runs
README.md - API loader → Aviationstack API: fetches flights
scripts/inserts_flights.py - API loader → PostgreSQL database: inserts data
scripts/inserts_flights.py - Operator → CSV loader: runs
README.md - CSV loader → Airport CSV: reads
scripts/inserting_airports.py - CSV loader → PostgreSQL database: inserts airports
scripts/inserting_airports.py - SQL requests → PostgreSQL database: queries
README.md - Database views → PostgreSQL database: defines views