For online ordering of concert seats or airline tickets, do we need Record Level Locking or is Transaction good enough?
For concert ticket (say, seat Number 20B), or airline ticket (even with overbooking, the limit is 210, for example), I think the website cannot lock any record or begin transaction when showing the ticket purchase screen.
But after the user clicks "Confirm Purchase", then the server should Begin a Transaction, Purchase Seat Number 20B, and try to Commit.
If another user already bought Seat 20B in a previous transaction, then it is the "Commit" part that the current transaction will fail?
So... we don't need Record Level Locking? Do Transactions always go serialized (one after another), so that's why we can know for sure there is no "race condition"? In what situation is Record Level Locking needed then?