Questions: Lost Update Problem: Overwriting Concurrent Writes

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A bank account holds $500. Transaction A reads $500 and plans to write $600 (adding $100). Transaction B reads $500 and plans to write $700 (adding $200). A commits first, then B commits. What is the final balance?

A$800 — both deposits are applied
B$700 — B's write silently overwrites A's $600, losing A's $100 deposit
C$600 — A's write is preserved and B's is rejected because A committed first
D$500 — both writes are rolled back because a conflict was detected
Question 2 Multiple Choice

Which of the following correctly prevents the lost update problem in a concurrent database system?

AUsing the READ COMMITTED isolation level, which is the default in many databases
BWrapping each transaction in a BEGIN/COMMIT block
CUsing SELECT ... FOR UPDATE to lock the row at read time, held until COMMIT
DUsing READ UNCOMMITTED isolation for faster performance
Question 3 True / False

READ COMMITTED isolation level prevents the lost update problem in most database systems.

TTrue
FFalse
Question 4 True / False

Optimistic concurrency control prevents lost updates by rejecting a write if the underlying row has changed since it was read, typically using a version number or timestamp.

TTrue
FFalse
Question 5 Short Answer

Why is the lost update problem particularly hard to detect through testing individual transactions? Why does it only emerge from concurrent execution?

Think about your answer, then reveal below.