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)

Columns of the routes table
ColumnTypeConstraintsDescription
iduuidprimary key
origin_codechar(3)not null, references airports.iata_code
destination_codechar(3)not null, references airports.iata_code
flight_numbervarchar(8)not null
distance_kminteger
scheduled_duration_minutessmallintnot null
is_activebooleannot null

Indexes (2)

  • (origin_code, destination_code)
  • (flight_number)

Relationships