Skip to the content.

🔒 Isolation & Its Levels in Databases

Definition:

Isolation is a property of database transactions that ensures concurrent transactions do not interfere with each other.

It’s part of ACID properties (Atomicity, Consistency, Isolation, Durability).


1️⃣ Isolation Levels

Level Description Possible Phenomena
Read Uncommitted Transactions can read uncommitted changes from other transactions. Dirty reads
Read Committed Can only read committed data from other transactions. Non-repeatable reads
Repeatable Read Data read cannot change during the transaction. Prevents non-repeatable reads. Phantom reads possible
Serializable Transactions are fully isolated, as if executed one after another. None (strictest level)

2️⃣ Phenomena Explained


3️⃣ How It Works (Flow)

Transaction A → Reads/Writes
Transaction B → Reads/Writes concurrently

Isolation ensures Transaction B does not interfere with Transaction A 
according to the chosen isolation level.

4️⃣ Trade-offs

Isolation Level Concurrency Data Safety
Read Uncommitted High Low
Read Committed Medium Medium
Repeatable Read Low High
Serializable Very Low Very High

5️⃣ Analogy


💡 Key takeaway: