routes table
The routes table in the Airline Reservation Database Schema schema has 7 columns, keyed by id, with 2 foreign keys to airports. 2 columns in flights and fares reference it.
The city pair and its published flight number. A route is a pattern; flights are its dated instances.
Columns (7)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| origin_code | char(3) | not null, references airports.iata_code | |
| destination_code | char(3) | not null, references airports.iata_code | |
| flight_number | varchar(8) | not null | |
| distance_km | integer | ||
| scheduled_duration_minutes | smallint | not null | |
| is_active | boolean | not null |
Indexes (2)
(origin_code, destination_code)(flight_number)
Relationships
routes.origin_codereferencesairports.iata_coderoutes.destination_codereferencesairports.iata_codeflights.route_idreferencesroutesfares.route_idreferencesroutes