3
I’m using an Ecommerce system that uses Mysql Transactions to maintain data integrity, for example in the simultaneous purchase of multiple customers of the same product where the system needs to decrease inventory and prevent it from being negative.
Technically, how Mysql does the control to prevent a request/query from one user from conflicting with another user(s) user(s) and thus maintaining this integrity?
What is the best practice for testing this integrity? Maybe use an HTTP client to generate multiple HTTP requests in which to simulate purchases?
Is there a number of simultaneous queries where the use of Transactions turns out to be unnecessary? If yes, from how many concurrent users we have to worry about integrity using Mysql Transactions?