PracHub
QuestionsLearningGuidesInterview Prep
|Home/System Design/Serval

Model Flights, Passengers, Bookings, and Seat Holds

Last updated: Jul 28, 2026

Quick Overview

Design a relational flight-booking model for passengers, scheduled departures, seat reservations, and temporary holds. Explain efficient lookup in both directions, retry behavior, transaction boundaries, expiration races, cancellation history, pagination, and concurrent attempts to claim one seat.

  • medium
  • Serval
  • System Design
  • Software Engineer

Model Flights, Passengers, Bookings, and Seat Holds

Company: Serval

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Technical Screen

Design a relational data model for a flight-booking service that must support these operations efficiently: - Book a passenger on a flight. - Retrieve the passenger list for a flight. - Retrieve all flights booked by a passenger. - Place a temporary hold on a seat before a booking is completed. Define tables, primary and foreign keys, uniqueness rules, indexes, transaction boundaries, and hold expiration behavior. Explain how the design prevents two users from holding or booking the same seat concurrently. ### Constraints & Assumptions - A flight instance represents one scheduled departure, not a reusable route definition. - Seat labels are unique within one flight instance. - A passenger may book many flights, and a flight has many passengers. - Holds expire automatically and do not become bookings without an explicit confirmation. - Client retries and concurrent requests are expected. ### Clarifying Questions to Ask - Can one booking contain multiple passengers and seats? - May passengers have bookings without assigned seats? - What states and cancellation rules apply to bookings? - How long do holds last, and may they be extended? ### What a Strong Answer Covers - Models the flight-passenger relationship with a booking or segment table rather than duplicating arrays. - Uses keys and indexes that directly serve both flight-to-passenger and passenger-to-flight queries. - Defines seat inventory and a database-enforced exclusivity strategy. - Gives holds explicit state and expiration, with safe confirmation and cleanup. - Handles retries, cancellation, and concurrent confirmation transactionally. - Discusses historical schedule changes, audit fields, and query pagination. ### Follow-up Questions 1. How would you support a multi-passenger reservation under one confirmation code? 2. What happens if a hold expires at the same moment confirmation arrives? 3. How would you model a flight cancellation or aircraft seat-map change without destroying history?

Quick Answer: Design a relational flight-booking model for passengers, scheduled departures, seat reservations, and temporary holds. Explain efficient lookup in both directions, retry behavior, transaction boundaries, expiration races, cancellation history, pagination, and concurrent attempts to claim one seat.

|Home/System Design/Serval

Model Flights, Passengers, Bookings, and Seat Holds

Serval logo
Serval
Jul 12, 2026, 12:00 AM
mediumSoftware EngineerTechnical ScreenSystem Design
0
0

Design a relational data model for a flight-booking service that must support these operations efficiently:

  • Book a passenger on a flight.
  • Retrieve the passenger list for a flight.
  • Retrieve all flights booked by a passenger.
  • Place a temporary hold on a seat before a booking is completed.

Define tables, primary and foreign keys, uniqueness rules, indexes, transaction boundaries, and hold expiration behavior. Explain how the design prevents two users from holding or booking the same seat concurrently.

Constraints & Assumptions

  • A flight instance represents one scheduled departure, not a reusable route definition.
  • Seat labels are unique within one flight instance.
  • A passenger may book many flights, and a flight has many passengers.
  • Holds expire automatically and do not become bookings without an explicit confirmation.
  • Client retries and concurrent requests are expected.

Clarifying Questions to Ask Guidance

  • Can one booking contain multiple passengers and seats?
  • May passengers have bookings without assigned seats?
  • What states and cancellation rules apply to bookings?
  • How long do holds last, and may they be extended?

What a Strong Answer Covers Guidance

  • Models the flight-passenger relationship with a booking or segment table rather than duplicating arrays.
  • Uses keys and indexes that directly serve both flight-to-passenger and passenger-to-flight queries.
  • Defines seat inventory and a database-enforced exclusivity strategy.
  • Gives holds explicit state and expiration, with safe confirmation and cleanup.
  • Handles retries, cancellation, and concurrent confirmation transactionally.
  • Discusses historical schedule changes, audit fields, and query pagination.

Follow-up Questions Guidance

  1. How would you support a multi-passenger reservation under one confirmation code?
  2. What happens if a hold expires at the same moment confirmation arrives?
  3. How would you model a flight cancellation or aircraft seat-map change without destroying history?

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Serval•More Software Engineer•Serval Software Engineer•Serval System Design•Software Engineer System Design

Your design canvas — auto-saved

PracHub

Master your tech interviews with 9,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.