🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.It reads the seat map from the cache
  2. B.It checks that exactly one row was changed
  3. C.It waits 5 minutes
  4. 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 →