10 units in stock, 100 buyers at the same moment. The usual "check, then save" code sold 100. Here is how a conditional UPDATE, row locks and stock reservations fix it, tested with real parallel requests.
Category
Databases & MySQL
Schema design, indexes, transactions and queries that keep working as data grows.
1 article
Explore topics
Pick a subject and read everything written about it.