How username9843/airport-mis works
Purpose and Execution
PostgreSQL database project for Ercan Airport (LCEN) management information. The repository is SQL-first, with no application runtime: create a PostgreSQL database and execute the scripts in sequence:
1. 01_ddl.sql — schema and database behavior
2. 02_dml.sql — seed/sample operational data
3. 03_queries.sql — management reporting queries
README.md defines this execution order; REPORT.md is the supporting design/report artifact.
Schema and Integrity Layer
01_ddl.sql is the system’s primary architectural boundary. It creates the relational model for airport operations, including tables, keys, constraints, and a trigger. This layer owns canonical data structure and enforces business/data integrity inside PostgreSQL rather than in an external service.
Paths:
• 01_ddl.sql
• REPORT.md
Operational Data Domain
The schema represents airport-management entities and their relationships, with the report providing the ERD/design context. Core operational records are stored in PostgreSQL and linked through relational constraints established by the DDL.
The database is the sole material runtime and persistence boundary; there are no indicated APIs, UI services, queues, or external integrations.
Paths:
• 01_ddl.sql
• REPORT.md
Seed and Demonstration Data
02_dml.sql populates the schema with sample data after tables and constraints exist. It is intended for reproducible demonstrations and for supplying the reporting layer with representative operational records.
The DML script depends on successful execution of 01_ddl.sql; its inserts must conform to the DDL’s relationships and trigger behavior.
Paths:
• 02_dml.sql
• 01_ddl.sql
Reporting and Management Queries
03_queries.sql is the read/reporting stage. It contains 15 management queries over the populated operational schema, producing decision-support views directly from PostgreSQL.
This script depends on both prior stages: schema objects from 01_ddl.sql and available records from 02_dml.sql.
Paths:
• 03_queries.sql
• 02_dml.sql
• 01_ddl.sql
Primary Control and Data Flow
Control flow is linear and manual or SQL-client-driven:
01_ddl.sql → 02_dml.sql → 03_queries.sql
Data flow follows the same direction: DDL defines valid structures and database-side enforcement; DML writes sample airport data; queries join, filter, aggregate, and present that data for management use. The trigger in 01_ddl.sql is an important write-time control boundary because it can apply behavior automatically during data changes.
Infrastructure Boundaries
Required infrastructure is a PostgreSQL server and a database created by the operator. SQL execution tooling is external to the repository (for example, psql or a PostgreSQL GUI), and no deployment automation or application host is represented.
Paths:
• README.md
• 01_ddl.sql
• 03_queries.sql
Main entry points: 01_ddl.sql DDL stage · 03_queries.sql Management query stage · 02_dml.sql Seed data stage · README.md Execution guide
Components 11
SQL project
- Execution guide · Defines the required script order.
README.md - Design report and ERD · Provides relational design context.
REPORT.md - DDL stage · Creates the airport operational model and database behavior.
01_ddl.sql - Seed data stage · Loads reproducible sample operational records.
02_dml.sql - Management query stage · Contains 15 decision-support queries.
03_queries.sql
PostgreSQL runtime
The sole persistence and execution boundary.
- Airport operational schema · Canonical airport-management entities and relationships.
01_ddl.sql - Keys and constraints · Enforces relational and business-data validity.
01_ddl.sql - Write-time trigger · Applies automatic behavior during data changes.
01_ddl.sql - Operational records · Representative airport data stored in the schema.
02_dml.sql - Management results · Joined, filtered, and aggregated operational information.
03_queries.sql
Other components
- Operator / SQL client · Manually creates the database and runs the scripts.
Connections 16
- Execution guide → Operator / SQL client: directs execution
- Operator / SQL client → DDL stage: runs first
- DDL stage → Airport operational schema: creates
- DDL stage → Keys and constraints: defines
- DDL stage → Write-time trigger: installs
- Design report and ERD → Airport operational schema: documents
- DDL stage → Seed data stage: must precede
- Operator / SQL client → Seed data stage: runs second
- Seed data stage → Operational records: inserts
- Keys and constraints → Operational records: validates
- Write-time trigger → Operational records: acts on writes
- Seed data stage → Management query stage: supplies data before
- Operator / SQL client → Management query stage: runs third
- Management query stage → Airport operational schema: reads
- Management query stage → Operational records: queries
- Management query stage → Management results: produces