When working on relational databases there are some guarantees called ACID, but these guarantees are not as safe as we usually think.
Let's start with a simple situation, imagine that you have a system that holds a balance of each user in some SQL database.
| user A | user B |
|---|---|
| id: 1 | id: 2 |
| balance: 100 | balance: 50 |