Skip to content

CS Professional · Artificial Intelligence, Data Analytics and Cyber Security - Laws and Practice · Database Management

A bank's employee, while a transaction updating a customer's balance is still uncommitted, is shown by another session a balance value that is later rolled back. Under the standard SQL concurrency problems, this anomaly is called:

This is a dirty read. One transaction reads data modified by another transaction that has not committed, and that data is later rolled back, so the reader has seen a value that never officially existed. Proper isolation levels prevent it.

  1. ADirty readCorrect
  2. BLost update
  3. CPhantom deletion
  4. DDeadlock

Explanation

A dirty read occurs when one transaction reads data written by another transaction that has not yet committed and that is later rolled back. A lost update involves two writes overwriting each other, and a deadlock is mutual waiting for locks.

Did you get it right without looking?

One question tells you little. A timed set on Database Management shows your real accuracy, how long you take and where you lose marks.

More Database Management questions