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