← Quiz: Design a Ticket Booking System: all 10 questions
Quiz: Design a Ticket Booking System · Question 3 of 10
After running UPDATE seats SET status='HELD' ... WHERE id='B7' AND status='FREE', how does the app know whether it got…
After running UPDATE seats SET status='HELD' ... WHERE id='B7' AND status='FREE', how does the app know whether it got the seat?
- A.It reads the seat map from the cache
- B.It checks that exactly one row was changed
- C.It waits 5 minutes
- D.It asks the payment gateway
Answer & explanation
Correct answer: It checks that exactly one row was changed
Zero rows changed means someone else already holds or booked the seat.
Can you get the rest right without peeking?
Take the timed Quiz: Design a Ticket Booking System quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →