Introduction

Isolation is a transaction property that defines how concurrently running transactions see each other's data. It establishes the visibility semantics of the transaction, i.e., how and when parts of the transaction should be visible to other concurrently running transactions.

There are different isolation levels, each of which caters to different types of use cases and scenarios. The following section covers different types of isolation levels in detail and their implications.

Terminology

Before we discuss the different isolation level guarantees, let’s go over some terminology.

Dirty reads

If a transaction includes a series of write operations and executes certain write operations, and if another transaction reads the values written by the first transaction before the commit, it is a dirty read. Dirty reads are problematic because, if the first transaction aborts, the second transaction will have read values that do not exist later.

Get hands-on with 1400+ tech skills courses.