Beta Phase: Square45 is currently in beta testing. Expect some features or content to be incomplete or missing.
45

Isolation Levels

Levels of granularity defining the extent to which concurrent transactions are shielded from each other's effects.
📜

The statement of the theorem

Let T1\mathcal{T}_1 and T2\mathcal{T}_2 be concurrent transactions. Isolation levels define the permissible visibility of intermediate states. \n\n1. **Read Uncommitted:** T1\mathcal{T}_1 may read uncommitted writes from T2\mathcal{T}_2 (Dirty Reads allowed).\n2. **Read Committed:** T1\mathcal{T}_1 only reads values committed by T2\mathcal{T}_2. Read(T1,X)    X committed before Read(T1,X)\text{Read}(\mathcal{T}_1, X) \implies X \text{ committed before } \text{Read}(\mathcal{T}_1, X).\n3. **Repeatable Read:** T1\mathcal{T}_1 reads the same committed value of XX throughout its execution, preventing Non-Repeatable Reads. Read(T1,X) at time t1=Read(T1,X) at time t2\text{Read}(\mathcal{T}_1, X) \text{ at time } t_1 = \text{Read}(\mathcal{T}_1, X) \text{ at time } t_2.\n4. **Serializable:** T1\mathcal{T}_1 must behave as if it executed entirely before or entirely after T2\mathcal{T}_2, preventing Phantom Reads and all other anomalies.