← All topics
Quiz: Design a Ticket Booking System: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. What causes double booking in "check, then act" code?
- Q2. What does this print? (code)
- Q3. After running UPDATE seats SET status='HELD' ... WHERE id='B7' AND status='FREE', how does the app know whether it got the seat?
- Q4. Why should seat holds have an expiry time?
- Q5. What does this print? (code)
- Q6. A family books 4 seats and the third seat is already taken. What should happen?
- Q7. Why confirm bookings from the payment gateway's webhook rather than only from the browser redirect?
- Q8. Payment succeeds but the user's hold had already expired and the seat was sold to someone else. What should the system do?
- Q9. Can the seat map shown while browsing come from a cache with a few seconds of staleness?
- Q10. What does a virtual waiting room do during a booking rush?