acid

Definition

Recoverable Schedule (ACID)

A schedule is recoverable if for each pair of transactions , where reads data items written by , must commit before .

Examples

Recoverable Schedule Example

Irrecoverable Schedule Example

Time
1write()100 (uncomitted)
2read()100
3commit
4abort

In this scenario:

  1. writes a value to data item . This value is not yet committed and resides in a memory buffer.
  2. reads the uncommitted value of written by . This is a dirty read.
  3. then commits its changes. Since has committed, its results are now considered permanent.
  4. Subsequently, fails for some reason and must be aborted. The system needs to roll back the changes made by .

The problem here is that , which has already committed, based its operations on a value from transaction that never successfully completed. The value of read by is now effectively a “ghost” value. Since has committed, we cannot simply roll it back. This leads to an inconsistent database state.