← AT&T Interview Insights

AT&T·Software Engineer·Onsite - System Design / Architecture·Senior

Senior
Jun 2026

Summary

System design round focused entirely on a flight ticket booking system. Pretty deep dive, went from schema design all the way into B-tree internals and concurrency issues around double booking.

Questions Asked (5)

Q1

Design the database schema for a flight ticket booking system. What tables would you create and how would they relate to each other?

Data ModelingSystem Design
Author's notes

Went with Flight, Passenger, and Flight_ticket tables which felt pretty natural.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the core requirements and scope, then identify the main entities and their relationships. Propose a normalized schema with key tables, and discuss trade-offs and scalability considerations.

Pro tip: Mention how you would handle concurrency and seat locking during booking to prevent double-booking, as this is a critical real-world issue in flight reservation systems.

1. Clarify Requirements

Ask about expected scale, read/write patterns, and specific features like multi-leg flights, seat selection, and payment integration to tailor the schema.

2. Identify Core Entities

List the main entities such as Flight, Airport, Aircraft, Seat, Passenger, Booking, and Payment, and define their attributes.

3. Define Relationships

Establish relationships between entities, e.g., a Flight has many Seats, a Booking has many Passengers, and a Flight connects two Airports.

4. Design Tables and Keys

Create normalized tables with primary and foreign keys, and consider junction tables for many-to-many relationships like Booking_Passenger.

5. Discuss Trade-offs and Scalability

Address normalization vs. denormalization, indexing strategies, and how to handle high concurrency and large data volumes.

Key Points to Mention

  • Normalization to reduce redundancy, but consider denormalization for read-heavy flight search queries.
  • Use of composite keys or surrogate keys for entities like Flight (e.g., flight_number + departure_date).
  • Seat inventory management with status (available, held, booked) and optimistic locking to prevent double-booking.
  • Handling multi-leg itineraries through a FlightSegment table linking flights.
  • Payment and booking status tracking with audit trails.
  • Indexing on frequently queried columns like departure_airport, arrival_airport, and departure_time.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

What indexes would you build on these tables, and why?

Data ModelingTechnical Trade-offs
Author's notes

Talked about indexing flight_id and passenger_id as foreign keys, and putting an index on departure time for search queries.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the workload and query patterns before proposing any indexes, since indexes must serve actual queries. Then walk through each table's primary access paths (joins, filters, sorts) and propose indexes that cover those patterns, explaining the trade-offs in write performance and storage. Finally, mention how you would validate the choices with EXPLAIN plans and monitor index usage.

Pro tip: Always tie every index to a specific query or workload requirement, and explicitly state the cost: each index slows down writes and consumes storage. This shows you understand that indexing is a trade-off, not a checklist.

1. Clarify the workload and access patterns

Ask about the most frequent and critical queries, expected read/write ratio, and data volume. This ensures your index recommendations are grounded in real usage rather than assumptions.

2. Identify candidate columns for indexing

Look at columns used in WHERE clauses, JOIN conditions, ORDER BY, and GROUP BY. Prioritize columns with high selectivity and frequent use.

3. Design composite indexes for multi-column filters

For queries filtering on multiple columns, propose composite indexes with the most selective column first, considering equality before range conditions. Mention covering indexes to avoid table lookups.

4. Evaluate trade-offs and alternatives

Discuss the impact on write performance, storage, and maintenance. Consider whether a covering index, index-only scan, or partitioning might be better than multiple single-column indexes.

5. Validate and iterate

Explain how you would test the indexes using EXPLAIN plans, measure query performance, and monitor index usage to remove unused indexes. Emphasize that indexing is an iterative process.

Key Points to Mention

  • Selectivity: index columns with many distinct values (e.g., user_id, email) rather than low-cardinality columns (e.g., status).
  • Composite index column order: equality conditions first, then range conditions, and consider sort order.
  • Covering indexes: include all columns needed by a query to enable index-only scans.
  • Write overhead: each index adds cost to INSERT, UPDATE, DELETE operations.
  • Foreign keys: indexing foreign key columns to speed up joins and avoid full table scans.
  • Monitoring and maintenance: use tools like EXPLAIN, index usage statistics, and periodic reviews to drop unused indexes.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

Can you explain how a B-tree index works internally?

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

Blanked for a second on the exact branching factor mechanics.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining a B-tree index as a balanced tree data structure optimized for disk-based storage, then explain its internal node structure and search/insert operations. Emphasize how its design minimizes disk I/O and maintains balance, making it ideal for database indexing.

Pro tip: Relate the B-tree's high fanout and balanced height to real-world database performance, showing you understand the trade-offs between read/write efficiency and storage overhead.

1. Define B-tree index

Explain that a B-tree index is a self-balancing tree data structure that keeps data sorted and allows searches, sequential access, insertions, and deletions in logarithmic time.

2. Describe node structure

Detail that each node contains multiple keys and child pointers, with all leaves at the same depth, and that nodes are sized to match disk blocks to minimize I/O.

3. Explain search operation

Walk through how a search traverses from root to leaf, comparing keys at each node to choose the correct child, resulting in O(log n) disk accesses.

4. Explain insertion and balancing

Describe how insertions may cause node splits, propagating upward and possibly increasing tree height, but always maintaining balance and the B-tree properties.

5. Highlight advantages

Conclude with why B-trees are used in databases: efficient range queries, high fanout reducing tree height, and optimized for disk-based systems.

Key Points to Mention

  • Balanced tree with all leaves at the same level
  • High fanout (many keys per node) reduces tree height
  • Nodes sized to disk blocks to minimize I/O
  • Logarithmic time complexity for search, insert, delete
  • Used in database indexes for efficient range queries
  • Node splits and merges maintain balance during updates

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

Walk through the full UX flow and the backend queries involved when a user books a flight.

System DesignAPI & Integrations
Author's notes

This was actually fun.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing the end-to-end flow from the user's perspective, then dive into the backend components and queries that support each step. Emphasize how the system ensures data consistency, scalability, and a smooth user experience, especially under high traffic. Conclude by discussing trade-offs and potential optimizations.

Pro tip: Show that you consider failure scenarios and idempotency—mention how you'd handle payment failures, duplicate bookings, and race conditions. This demonstrates production maturity beyond just happy-path design.

1. High-Level UX Flow

Describe the user journey: search flights, select flight, enter passenger details, review and pay, receive confirmation. Highlight key UX considerations like loading states, error handling, and responsiveness.

2. Frontend to Backend Interaction

Explain how the frontend communicates with backend APIs (e.g., REST or GraphQL) for each step, including request/response payloads and authentication/authorization.

3. Backend Services and Queries

Detail the backend services involved (flight search, booking, payment, inventory) and the database queries they execute, such as SELECT for availability, INSERT for booking, and UPDATE for seat inventory.

4. Data Consistency and Transactions

Discuss how you ensure atomicity across services, e.g., using distributed transactions, sagas, or two-phase commit, and how you handle concurrent bookings and inventory locking.

5. Post-Booking and Scalability

Cover confirmation emails, updating loyalty programs, and analytics. Mention caching, read replicas, and sharding to handle scale.

Key Points to Mention

  • Idempotency keys to prevent duplicate bookings
  • Database indexing and query optimization for flight search
  • Caching strategies (e.g., Redis) for frequently accessed flight data
  • Asynchronous processing for payment and confirmation (e.g., message queues)
  • Handling race conditions with optimistic/pessimistic locking
  • Monitoring and logging for debugging and performance

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q5

How would you prevent double booking when two users try to reserve the same seat at the same time?

System DesignTechnical Trade-offs
Author's notes

This turned into a whole thing.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints, such as expected concurrency and consistency needs. Then propose a layered solution using database transactions with appropriate isolation levels, optimistic or pessimistic locking, and possibly a distributed lock for scale. Finally, discuss trade-offs and how you would handle failures and retries.

Pro tip: Mention that you would first try to solve it at the database level with unique constraints or conditional updates, as they are simple and reliable, before introducing distributed locks which add complexity. Also, highlight the importance of idempotency keys to handle retries safely.

1. Clarify requirements

Ask about the scale, consistency requirements, and whether the system is distributed. This determines the appropriate solution.

2. Database-level solutions

Propose using transactions with SELECT ... FOR UPDATE or unique constraints on seat and time slot to prevent double booking.

3. Optimistic vs pessimistic locking

Discuss trade-offs: optimistic locking (version checks) for low contention, pessimistic locking for high contention but with performance impact.

4. Distributed locking

If the system is distributed, consider using a distributed lock (e.g., Redis, ZooKeeper) but note the added complexity and potential for failures.

5. Handle failures and retries

Ensure idempotency and proper error handling so that retries don't cause double bookings. Discuss compensation or rollback strategies.

Key Points to Mention

  • Database transactions and ACID properties
  • Unique constraints or conditional updates (e.g., UPDATE ... WHERE status = 'available')
  • Optimistic concurrency control (version numbers)
  • Pessimistic locking (SELECT ... FOR UPDATE)
  • Distributed locks (Redis, ZooKeeper) and their trade-offs
  • Idempotency keys to handle retries safely

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.