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