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)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| flight_id | uuid | not null, references flights.id | |
| fare_class_id | uuid | not null, references fare_classes.id | |
| authorized_seats | smallint | not null | |
| booked_seats | smallint | not null | |
| waitlist_count | smallint | not null | |
| is_closed | boolean | not null |
Indexes (2)
(flight_id, fare_class_id)unique(flight_id, is_closed)
Relationships
flight_inventory.flight_idreferencesflights.idflight_inventory.fare_class_idreferencesfare_classes.id