Multiple choice

Locking can be used for

  1. deadlock

  2. lost update

  3. uncommitted dependency

  4. inconsistent data

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Locking prevents the lost update problem, which occurs when two transactions read the same data and then overwrite each other's updates. By locking data before updating, one transaction waits for the other to complete, ensuring updates are applied sequentially. Deadlock (A) is a potential problem with locking, not a solution. Uncommitted dependency (C) and inconsistent data (D) are other concurrency issues that locking addresses.