ticket_coupons table

The ticket_coupons table in the Airline Reservation Database Schema schema has 6 columns, keyed by id, with 2 foreign keys to tickets and booking_segments.

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.

Columns (6)

Columns of the ticket_coupons table
ColumnTypeConstraintsDescription
iduuidprimary key
ticket_iduuidnot null, references tickets.id
booking_segment_iduuidnot null, references booking_segments.id
coupon_numbersmallintnot null
statuscoupon_statusnot null
used_attimestamptz

Indexes (2)

  • (ticket_id, coupon_number) unique
  • (booking_segment_id)

Relationships