VISUAL REFERENCE

Database Transactions Visual Map

Visualizing transaction isolation, anomalies, and concurrency control in modern databases.

Fundamentals

ACID Properties

TRANSACTIONAll Succeed or All Fail

The four key properties that guarantee database transactions are processed reliably.

Anomaly

Dirty Read

Tx1 (Write)Tx2 (Read)val=50Reads 50ROLLBACKData Invalid!

Occurs when a transaction reads data that has not yet been committed by another transaction.

Anomaly

Non-Repeatable Read

Tx1Tx2Read AUpdate ARead A'Value Changed

A row is retrieved twice and the values within the row differ between reads.

Anomaly

Phantom Read

Tx1Tx2Count: 3InsertCount: 4

Two identical queries are executed, but the collection of rows returned is different.

Concurrency

Deadlock

Res ARes BTx1 Waits BTx2 Waits A

Two or more transactions are waiting for each other to release locks, blocking forever.

Isolation Level

Serializable

Tx 1Tx 2Strict Order (Blocking)

The highest isolation level. Transactions behave as if they executed one after another.