---
title: "Isolation Levels and the Anomalies They Allow"
description: "Full isolation is expensive, so databases offer weaker levels, each defined by which anomalies it permits: dirty reads, non-repeatable reads, phantoms. Choosing a level is choosing which wrong answers"
canonical: https://lightmysky.com/learn/computing/isolation-levels-and-the-anomalies-they-allow-mt_utxPNgxveB
source: https://lightmysky.com/learn/computing/isolation-levels-and-the-anomalies-they-allow-mt_utxPNgxveB.md
retrieved: 2026-09-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Isolation Levels and the Anomalies They Allow

Full isolation is expensive, so databases offer weaker levels, each defined by which anomalies it permits: dirty reads, non-repeatable reads, phantoms. Choosing a level is choosing which wrong answers the application can tolerate.

Subject: Computing · Area: Data & Databases · Ages 20 to 21
Page: https://lightmysky.com/learn/computing/isolation-levels-and-the-anomalies-they-allow-mt_utxPNgxveB

## Ready when they can

- Produce an interleaving that shows a non-repeatable read
- Match each named anomaly to the lowest level that forbids it
- Choose an isolation level for a stated workload and justify it

## Lesson: Which wrong answers can you afford

You already know a transaction groups reads and writes. Full isolation is expensive, so databases offer weaker levels. Each level is defined by which wrong answers it permits, and choosing one means choosing which wrong answers your app can tolerate.

**Example.** Picture a non-repeatable read. Your transaction reads a balance of 100. Another transaction changes it to 80 and commits. Your transaction reads again and gets 80. The same query twice gave two answers inside one transaction.

The three named anomalies stack up. A dirty read sees data that was never committed. A non-repeatable read sees committed changes between its own reads. A phantom sees brand-new rows appear in a repeated range query. Each stronger level forbids one more: read committed forbids dirty reads, repeatable read forbids non-repeatable reads, and serializable forbids phantoms.

**Tip.** Match the level to the workload and say why. A bank balance needs serializable because money must never blur. A rough analytics count can run looser, since a slightly stale total harms nobody.

**Recap.** Each isolation level permits certain anomalies, so pick the weakest level whose wrong answers your app can tolerate.

## Practice

8 questions on this page, each with its working shown.

## Needs first

- [Transactions and the ACID Promise](https://lightmysky.com/learn/computing/transactions-and-the-acid-promise-mt_8Egjmafq-L)
- [Race Conditions and Mutual Exclusion](https://lightmysky.com/learn/computing/race-conditions-and-mutual-exclusion-mt_hygT74jJDE)

## Opens up

- [Concurrency Control: Locks and Snapshots](https://lightmysky.com/learn/computing/concurrency-control-locks-and-snapshots-mt_gOd17LRKel)
- [Consistency Models and the CAP Trade-off](https://lightmysky.com/learn/computing/consistency-models-and-the-cap-trade-off-mt_j6qtpYPHsr)
