Transactions and isolation levels

Transactions and isolation levels image

The main problem with relational databases is that any developer implementing an application executing SQL queries should understand how DB works under the hood, why and when to start transactions, and what's the difference between isolation levels. So, that's not enough to just know SQL or some ORM. Read this post if you're not sure what are the proper answers to the above questions. Also, we will discuss some differences between relational database implementations. You'll see, for example, that `REPEATABLE_READ` and `READ_UNCOMMITED` work differently in MySQL and Postgress. The discussion is very practical. There are lots of examples. For instance, we not just talk about pessimistic and optimistic locking but also when it's crucial for your application. I hope this post will clarify all questions that you had about transactions.