Practice
Learn
← Quit
0 / 0 correct
System Design
Hard
1 of 666
Hotel booking: inventory is a count of rooms per type per night. What prevents overselling?
A
Cache inventory in the browser
B
Read the count, then write count−1 later
C
Overbook freely and email apologies
D
A conditional decrement: UPDATE inventory SET booked = booked + 1 WHERE ... AND booked < total, checking affected rows