tickets table

The tickets table in the Airline Reservation Database Schema schema has 12 columns, keyed by id, with 4 foreign keys to bookings, booking_passengers, fares and tickets. 3 columns in mileage_transactions, ticket_coupons and refunds reference it.

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.

Columns (12)

Columns of the tickets table
ColumnTypeConstraintsDescription
iduuidprimary key
booking_iduuidnot null, references bookings.id
booking_passenger_iduuidnot null, references booking_passengers.id
ticket_numbervarchar(14)unique, not null
statusticket_statusnot null
fare_iduuidreferences fares.id
base_amount_minorbigintnot null
tax_amount_minorbigintnot null
total_amount_minorbigintnot null
currencychar(3)not null
reissued_from_ticket_iduuidreferences tickets.id
issued_attimestamptznot null

Indexes (2)

  • (booking_id)
  • (status, issued_at)

Relationships