Airline Reservation Database Schema database schema
The Airline Reservation Database Schema database schema by Colton Bristow has 34 tables (airports, aircraft_types, aircraft, seat_maps and 30 more), 261 columns and 56 relationships, documented column by column.
- Tables
- 34
- Columns
- 261
- Relationships
- 56
- Enums
- 24
Tables (34)
| Table | Columns | Description |
|---|---|---|
| airports | 8 | The IATA code is the natural key every other system quotes. timezone is not optional: every departure time in this schema is a LOCAL time at its airport. |
| aircraft_types | 6 | The model, e.g. 738 for a Boeing 737-800. Seat layout lives in seat_maps because one type can have several cabin configurations. |
| aircraft | 6 | A physical tail number. registration is what maintenance and ops actually track. |
| seat_maps | 4 | One aircraft type can fly several configurations. Separating this from the type is what makes a cabin refit possible without rewriting history. |
| seats | 9 | The physical seat on a layout, not on a flight. Exit row and legroom flags drive both pricing and safety eligibility rules. |
| routes | 7 | The city pair and its published flight number. A route is a pattern; flights are its dated instances. |
| flights | 12 | One dated instance of a route. aircraft_id is nullable because tail assignment happens close to departure and can change. |
| flight_status_events | 6 | Append-only status history. flights.status is the latest value; this table is why an on-time performance report is possible. |
| crew_members | 7 | |
| crew_assignments | 4 | The role is repeated here rather than read from crew_members, because a first officer can be rostered as captain on a given flight. |
| fare_classes | 5 | The single-letter booking class every airline uses: Y, B, M, Q and so on. priority orders them for upgrade and downgrade logic. |
| fares | 9 | A priced fare on a route, valid for a date window. Fares are never edited in place: a new price is a new row with a new validity window. |
| fare_rules | 10 | The conditions attached to a fare. This is what a passenger is really buying when a cheaper ticket is non-refundable. |
| flight_inventory | 7 | 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. |
| passengers | 10 | The traveller, who is not necessarily the booker. Name must match the travel document exactly, which is why it is not editable after ticketing. |
| frequent_flyer_accounts | 8 | miles_balance is spendable; qualifying_miles drives tier and resets annually. Conflating the two is the classic loyalty-programme bug. |
| mileage_transactions | 8 | Signed append-only ledger. miles_balance is the running total and can always be rebuilt from here. |
| bookings | 11 | The PNR. record_locator is the six-character code a passenger quotes. A booking holds seats; it does not itself represent money paid. |
| booking_passengers | 5 | passenger_type drives fare and baggage entitlement. An infant on lap has no seat but still needs a row here. |
| booking_segments | 6 | The itinerary. segment_order is what turns a set of flights into a journey with connections in the right sequence. |
| tickets | 12 | The financial document, one per passenger. The 13-digit number is what settles between airlines. A reissue is a NEW ticket pointing at the old one. |
| ticket_coupons | 6 | One coupon per flown segment, each independently used, refunded or exchanged. This is why a no-show on one leg does not void the rest of the ticket. |
| seat_assignments | 7 | Per segment, not per booking: a connecting journey means a different seat on each leg. The unique key is what stops double-selling 14A. |
| special_service_requests | 7 | Wheelchair, special meal, unaccompanied minor. The four-letter SSR codes are an industry standard, which is why this is a code column rather than an enum. |
| waitlists | 7 | Ordered queue per flight and class. Clearing a waitlist is what happens when a cancellation frees inventory. |
| ancillary_products | 7 | Extra bags, lounge access, priority boarding, insurance. Ancillary revenue is often the difference between profit and loss on a fare. |
| ancillary_purchases | 9 | Amount is copied from the product at purchase, so a later price change never rewrites what was paid. |
| baggage | 8 | The tag number is the ten-digit licence plate the whole industry tracks. Tied to a segment because a bag can be short-checked to a connection. |
| check_ins | 7 | Per passenger per segment. Acceptance is where document checks and SSR fulfilment are confirmed. |
| boarding_passes | 9 | sequence_number is the order of acceptance and is what denied-boarding rules work from when a flight is oversold. |
| payments | 9 | miles_redeemed sits beside the cash amount because award and cash-plus-points bookings are the same transaction shape. |
| refunds | 9 | Refunds act on TICKETS, not on bookings, and record the penalty separately so the fare rule applied stays visible. |
| disruptions | 8 | is_carrier_fault is the column that decides compensation liability under EU261 and similar regimes. Not a detail worth omitting. |
| rebookings | 8 | Links the old segment to the new one, so a passenger journey stays traceable across an involuntary reroute. |
Enums (24)
- aircraft_status
- active, maintenance, stored, retired
- cabin_class
- economy, premium_economy, business, first
- seat_position
- window, middle, aisle
- flight_status
- scheduled, boarding, departed, in_air, landed, arrived, delayed, cancelled, diverted
- crew_role
- captain, first_officer, purser, cabin_crew
- booking_status
- held, confirmed, ticketed, cancelled, expired, flown
- booking_channel
- website, mobile, call_centre, travel_agent, gds, airport
- passenger_type
- adult, child, infant_in_lap, infant_with_seat
- segment_status
- confirmed, waitlisted, cancelled, flown, no_show
- ticket_status
- issued, exchanged, refunded, void, used
- coupon_status
- open, checked_in, used, refunded, exchanged, void
- ssr_status
- requested, confirmed, declined, fulfilled
- waitlist_status
- waiting, cleared, expired, cancelled
- ancillary_type
- extra_baggage, seat_selection, lounge, priority_boarding, meal, insurance, wifi
- baggage_status
- checked, loaded, in_transit, delivered, delayed, lost, damaged
- checkin_method
- web, mobile, kiosk, counter
- checkin_status
- accepted, standby, denied, cancelled
- payment_method
- card, bank_transfer, cash, voucher, miles, agency_credit
- payment_status
- pending, authorized, captured, failed, refunded
- refund_status
- requested, approved, processed, rejected
- mileage_type
- earned, redeemed, expired, adjustment, transferred
- loyalty_tier
- basic, silver, gold, platinum
- disruption_type
- delay, cancellation, diversion, overbooking, equipment_change
- rebooking_reason
- disruption, voluntary_change, upgrade, downgrade, misconnection
Document your own schema
This page is published from DB Planner, a collaborative ER diagram tool. Write the schema in the DBML editor or import it from SQL, then publish docs like these from the project's sharing settings.