Questions: Dirty Read Anomaly: Reading Uncommitted Changes

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

Transaction A debits $200 from an account (balance drops from $500 to $300) but has not yet committed. Transaction B reads the balance, sees $300, and approves a $250 withdrawal. Transaction A then rolls back. What is the core problem?

ATransaction B has acted on data that never existed in any committed state — the 'true' balance was always $500, and B's decision was based on a phantom value
BTransaction A's rollback is invalid because Transaction B already observed its changes
CThere is no real problem — rollbacks always restore committed state correctly regardless of what other transactions observed
DThe issue is that B should have used SELECT FOR UPDATE to lock the row first
Question 2 Multiple Choice

Why does the Read Uncommitted isolation level exist in databases, despite allowing dirty reads?

AIt is a historical artifact that modern databases have deprecated in favor of safer alternatives
BIt prevents phantom reads while permitting dirty reads, making it appropriate for financial applications
CIt offers better performance by skipping locking and versioning overhead, making it acceptable for approximate queries where exact correctness is not required
DIt is required by distributed databases that cannot coordinate transaction commits across nodes
Question 3 True / False

A dirty read can primarily cause problems if the reading transaction itself also writes data based on what it read.

TTrue
FFalse
Question 4 True / False

If Transaction A rolls back after Transaction B has read its uncommitted changes, the database's committed state is correctly restored, but Transaction B may have made decisions or produced output based on data that never existed in any committed form.

TTrue
FFalse
Question 5 Short Answer

Why is the term 'dirty' used for dirty reads? What specific characteristic of the read makes it dangerous?

Think about your answer, then reveal below.