A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Isolation Level: READ COMMITTED

College Depth 102 in the knowledge graph I know this Set as goal
2topics build on this
407prerequisites beneath it
See this on the map →
Concurrency Control in DatabasesIsolation Level: SERIALIZABLENon-Repeatable Read Anomaly
isolation concurrency anomalies

Core Idea

READ COMMITTED prevents dirty reads by only reading committed data, but allows non-repeatable reads and phantom reads. It is the default level in many databases.

How It's Best Learned

Observe how two concurrent sessions interact: the first reads data, the second modifies and commits, and the first re-reads and sees the change.

Explainer

From your study of concurrency control, you know that transactions running simultaneously can interfere with each other in ways that produce incorrect results. Isolation levels are the database's way of letting you choose how much interference you are willing to tolerate in exchange for performance. READ COMMITTED is the most widely used default — it is the out-of-the-box isolation level in PostgreSQL, Oracle, and SQL Server — because it strikes a practical balance between safety and concurrency.

The guarantee READ COMMITTED provides is simple: your transaction will never see data that another transaction has written but not yet committed. This eliminates dirty reads, where you might act on data that gets rolled back moments later. Imagine transaction A updates an account balance from $1000 to $500, and before A commits, transaction B reads the balance and sees $500. If A then rolls back, B made a decision based on data that never actually existed. Under READ COMMITTED, B would still see $1000 — the last committed value — until A commits its change.

The mechanism behind this varies by database engine but typically involves one of two approaches. In lock-based implementations, a writer holds an exclusive lock on modified rows until commit, and readers block until the lock is released. In multi-version concurrency control (MVCC), which PostgreSQL and Oracle use, each write creates a new version of the row. Readers see the most recently committed version at the time of each individual statement, so they never block on writers and writers never block on readers. The MVCC approach is generally preferred because it allows much higher concurrency — readers and writers can operate on the same rows simultaneously without waiting.

The critical limitation of READ COMMITTED is what it does *not* prevent. If your transaction reads the same row twice, and another transaction commits a change to that row in between, your second read will see the new value. This is the non-repeatable read anomaly — your transaction sees a different snapshot at different points in time. It also does not prevent phantom reads, where new rows matching your query appear between two executions of the same query. For many applications — web requests, short-lived transactions, reporting on recent data — these anomalies are acceptable because each statement sees a consistent committed state. But for transactions that must see a frozen snapshot of the database (like generating a financial report while other transactions are posting entries), you need a higher isolation level like REPEATABLE READ or SERIALIZABLE.

Practice Questions 5 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesBoolean AlgebraBoolean Type and Truth ValuesComparison Operators and Boolean TestsLogical Operators and Boolean AlgebraBoolean Algebra and Fundamental LawsLogic Gates FundamentalsImplementing Boolean Functions with GatesKarnaugh Map SimplificationCombinational Circuit DesignFlip-Flops and LatchesBinary Counters: Design and AnalysisBinary ArithmeticFixed-Point Number RepresentationTwo's Complement RepresentationOverflow and Underflow DetectionBinary Adders: Half-Adders and Full-AddersFull Adder and Carry PropagationCarry Lookahead Adder DesignHalf Adder Circuit DesignMultiplication Circuit DesignSequential Circuit DesignRegisters and Register FilesInstruction Set Architecture (ISA)Kernel Architecture and OS StructureSystem Calls and User/Kernel ModeProcesses and the Process Control BlockProcess Creation: fork() and exec()Process Termination and Resource CleanupProcess States and State TransitionsThreads and ConcurrencyThe Critical Section Problem and Race ConditionsMutual Exclusion and LocksConcurrency Control in DatabasesIsolation Level: SERIALIZABLEIsolation Level: READ COMMITTED

Longest path: 103 steps · 407 total prerequisite topics

Prerequisites (2)

Leads To (1)