booking_segments table

The booking_segments table in the Airline Reservation Database Schema schema has 6 columns, keyed by id, with 3 foreign keys to bookings, flights and fare_classes. 8 columns in ticket_coupons, seat_assignments, special_service_requests, ancillary_purchases and 3 more reference it.

The itinerary. segment_order is what turns a set of flights into a journey with connections in the right sequence.

Columns (6)

Columns of the booking_segments table
ColumnTypeConstraintsDescription
iduuidprimary key
booking_iduuidnot null, references bookings.id
flight_iduuidnot null, references flights.id
fare_class_iduuidnot null, references fare_classes.id
segment_ordersmallintnot null
statussegment_statusnot null

Indexes (2)

  • (booking_id, segment_order) unique
  • (flight_id, status)

Relationships