Which of the following scenarios may lead to an irrecoverable error in a database system?
View worked solution
Answer: D
A schedule is recoverable if, for each pair of transactions and such that reads a data item previously written by , the commit operation of appears before the commit operation of .
If reads a value written by an uncommitted transaction (known as a dirty read) and commits before commits, the schedule becomes irrecoverable. If subsequently aborts, the database cannot roll back the already-committed , violating the atomicity and durability properties.
Analyzing the Options:
- Option A: A transaction writes a data item after it is read by an uncommitted transaction (Write-After-Read). This does not create a dependency that affects recoverability.
- Option B: A transaction reads a data item after it is read by an uncommitted transaction (Read-After-Read). Read operations do not conflict or modify data, so this is completely safe.
- Option C: A transaction reads a data item after it is written by a committed transaction. Since the writing transaction is already committed, there is no risk of it aborting, making this scenario perfectly safe.
- Option D: A transaction reads a data item after it is written by an uncommitted transaction. This is a dirty read. If the reading transaction commits before the writing transaction, it leads to an irrecoverable error.
Free practice · Your answers on this page are not saved.
