Ticket Reservation Locking
Start Timer
0:00:00
Let’s say we’re building a ticket booking system for concerts, where multiple users might try to reserve the last few tickets at the same time.
How would you structure the SQL transaction to prevent overselling tickets, and would you use optimistic or pessimistic locking here? Why?
.
.
.
.
.
.
.
.
.
Comments