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.

ER diagram of the Airline Reservation Database Schema schema, showing 34 tables and their relationships
FIG. 1: entity relationship diagram, 34 tables
Tables
34
Columns
261
Relationships
56
Enums
24

Tables (34)

Tables in the Airline Reservation Database Schema schema
TableColumnsDescription
airports8The 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_types6The model, e.g. 738 for a Boeing 737-800. Seat layout lives in seat_maps because one type can have several cabin configurations.
aircraft6A physical tail number. registration is what maintenance and ops actually track.
seat_maps4One aircraft type can fly several configurations. Separating this from the type is what makes a cabin refit possible without rewriting history.
seats9The physical seat on a layout, not on a flight. Exit row and legroom flags drive both pricing and safety eligibility rules.
routes7The city pair and its published flight number. A route is a pattern; flights are its dated instances.
flights12One dated instance of a route. aircraft_id is nullable because tail assignment happens close to departure and can change.
flight_status_events6Append-only status history. flights.status is the latest value; this table is why an on-time performance report is possible.
crew_members7
crew_assignments4The role is repeated here rather than read from crew_members, because a first officer can be rostered as captain on a given flight.
fare_classes5The single-letter booking class every airline uses: Y, B, M, Q and so on. priority orders them for upgrade and downgrade logic.
fares9A 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_rules10The conditions attached to a fare. This is what a passenger is really buying when a cheaper ticket is non-refundable.
flight_inventory7Seats 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.
passengers10The 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_accounts8miles_balance is spendable; qualifying_miles drives tier and resets annually. Conflating the two is the classic loyalty-programme bug.
mileage_transactions8Signed append-only ledger. miles_balance is the running total and can always be rebuilt from here.
bookings11The PNR. record_locator is the six-character code a passenger quotes. A booking holds seats; it does not itself represent money paid.
booking_passengers5passenger_type drives fare and baggage entitlement. An infant on lap has no seat but still needs a row here.
booking_segments6The itinerary. segment_order is what turns a set of flights into a journey with connections in the right sequence.
tickets12The 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_coupons6One 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_assignments7Per 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_requests7Wheelchair, 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.
waitlists7Ordered queue per flight and class. Clearing a waitlist is what happens when a cancellation frees inventory.
ancillary_products7Extra bags, lounge access, priority boarding, insurance. Ancillary revenue is often the difference between profit and loss on a fare.
ancillary_purchases9Amount is copied from the product at purchase, so a later price change never rewrites what was paid.
baggage8The 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_ins7Per passenger per segment. Acceptance is where document checks and SSR fulfilment are confirmed.
boarding_passes9sequence_number is the order of acceptance and is what denied-boarding rules work from when a flight is oversold.
payments9miles_redeemed sits beside the cash amount because award and cash-plus-points bookings are the same transaction shape.
refunds9Refunds act on TICKETS, not on bookings, and record the penalty separately so the fare rule applied stays visible.
disruptions8is_carrier_fault is the column that decides compensation liability under EU261 and similar regimes. Not a detail worth omitting.
rebookings8Links 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.

More published database schemas