Skip to content
Ameen Abozaid
Planned lessonMID-015-L01

Concurrency anomalies

  • Lesson 1 of 7
  • Mid-level
On This Lesson 4 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

name and recognize the five anomalies.

Planned topics

  • Dirty read: reading another transaction's uncommitted data.
  • Non-repeatable read: the same row read twice gives different values.
  • Phantom: the same query returns a different set of rows the second time.
  • Lost update: two transactions read, then both write; one overwrites the other.
  • Write skew: two transactions read overlapping data and write different rows, breaking a rule that spans both (two doctors going off call).
Draft outline details

Demonstration

a timeline table for each anomaly with two columns (T1, T2) and the surprising result, using a Shop stock example for lost update.

Check your understanding

Two transactions each read stock = 5 and each write stock = 4. Which anomaly?

Show answer

Lost update.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.