flight_inventory table

The flight_inventory table in the Airline Reservation Database Schema schema has 7 columns, keyed by id, with 2 foreign keys to flights and fare_classes.

Seats are sold per FARE CLASS per flight, not per physical seat. authorized_seats deliberately can exceed the cabin count: that is how revenue management overbooks on purpose.

Columns (7)

Columns of the flight_inventory table
ColumnTypeConstraintsDescription
iduuidprimary key
flight_iduuidnot null, references flights.id
fare_class_iduuidnot null, references fare_classes.id
authorized_seatssmallintnot null
booked_seatssmallintnot null
waitlist_countsmallintnot null
is_closedbooleannot null

Indexes (2)

  • (flight_id, fare_class_id) unique
  • (flight_id, is_closed)

Relationships