Sobes.tech
Middle

Name the four levels of transaction isolation.

sobes.tech AI

Answer from AI

Four standard transaction isolation levels in SQL:

  1. READ UNCOMMITTED

    • Possible to read uncommitted data ("dirty" read).
    • Possible to read data that no longer exists ("phantom" read).
    • Possible to read the same data multiple times with different values ("non-repeatable" read).
  2. READ COMMITTED

    • Prevents "dirty" read.
    • Allows "non-repeatable" read.
    • Allows "phantom" read.
  3. REPEATABLE READ

    • Prevents "dirty" and "non-repeatable" reads.
    • Allows "phantom" read.
  4. SERIALIZABLE

    • The strictest level.
    • Prevents "dirty", "non-repeatable" and "phantom" reads.
    • Transactions are executed as if they are serialized (one after another).