Quick answer: A dirty read happens when Tj reads an item written by Ti before Ti commits. A schedule is irrecoverable if such a Tj commits before Ti commits or aborts. It is recoverable if every such Tj commits only after Ti commits. It is cascadeless if there are no dirty reads at all, which rules out cascading rollbacks. It is strict if, on top of that, no transaction writes an item last written by an uncommitted transaction. Serial ⊂ strict ⊂ cascadeless ⊂ recoverable, and recoverability is independent of serializability.
GATE often gives a schedule with commits and aborts and asks which of these classes it belongs to. This topic is part of the Transactions and Concurrency Control chapter.
Why recoverability matters
Even a serializable schedule can be unsafe if a transaction aborts after others have used its data. Concurrent execution can lead to:
- Irrecoverable schedules
- Cascading rollbacks
- Lost updates when a transaction aborts
All three can happen even when the schedule is serializable.
Notation used below: W1(A) means T1 writes A, R2(A) means T2 reads A, C1 means T1 commits and A1 means T1 aborts.
Dirty (uncommitted) read
Tj reads X after Ti wrote X, while Ti is still uncommitted.
Example: W1(X) … R2(X) …, with T1 not yet committed when R2(X) runs.
Irrecoverable schedule
A schedule is irrecoverable if Tj reads X written by Ti and Tj commits before Ti commits or aborts.
Example: W1(A), R2(A), C2, A1.
T2 has committed a value based on T1's write, and then T1's write is undone. T2 can't be rolled back because it already committed, so the database is left inconsistent.
Recoverable schedule
A schedule is recoverable if, whenever Tj reads X written by Ti, Tj commits only after Ti commits. If Ti aborts, Tj must abort too.
Example: W1(A), R2(A), C1, C2 is recoverable, because T2 commits after T1.
Cascading rollback
When one transaction aborts, every transaction that read its uncommitted data must abort too, and so on down the chain.
Example: T1 writes A. T2 reads A and writes B. T3 reads B and writes C. T4 reads C. If T1 fails before anyone commits:
T1 aborts
└─ T2 read A from T1 → abort
└─ T3 read B from T2 → abort
└─ T4 read C from T3 → abort
The cost is wasted CPU time and I/O on work that gets thrown away.
Cascadeless schedule
A schedule is cascadeless (avoids cascading rollback) if there are no dirty reads. Tj waits to read X until the transaction that wrote X has committed or aborted.
Every cascadeless schedule is also recoverable.
Example: W1(A), C1, R2(A), C2 is cascadeless.
Lost update (dirty write) problem
A lost update can happen when Tj writes X after an uncommitted Ti wrote X. If Ti then aborts and restores the old value of X, Tj's write is wiped out.
Example: W1(A), W2(A), C2, A1. Undoing T1 restores the value of A from before T1, which erases T2's committed write.
Strict schedule
A schedule is strict if:
- it is cascadeless (no dirty reads), and
- no transaction writes X while the last transaction that wrote X is still uncommitted.
Put simply, no transaction reads or writes an item until the last writer of that item has committed or aborted. Strict schedules make undo easy, because the DBMS just restores the before-image.
Summary table: classifying example schedules
| Schedule | Irrecoverable | Recoverable | Cascadeless | Strict |
|---|---|---|---|---|
| W1(A), R2(A), C2, C1 | Yes | No | No | No |
| W1(A), R2(A), C1, C2 | No | Yes | No | No |
| W1(A), W2(A), C1, C2 | No | Yes | Yes (no reads) | No (dirty write) |
| W1(A), C1, R2(A), W2(A), C2 | No | Yes | Yes | Yes |
How the classes relate
- Serial ⊂ strict ⊂ cascadeless ⊂ recoverable ⊂ all schedules.
- Irrecoverable schedules are exactly the schedules that are not recoverable.
- A strict schedule may or may not be serializable.
- A serializable schedule may or may not be recoverable.
- Strict 2PL produces strict schedules.
| Class | What it forbids |
|---|---|
| Recoverable | Committing after a dirty read before the writer commits |
| Cascadeless | Any dirty read |
| Strict | Any dirty read or dirty write |
Exam tips
- For each read, ask: who last wrote this item, and had they committed yet? That one check settles cascadeless.
- If there is a dirty read, compare commit order to decide recoverable vs irrecoverable.
- For strict, repeat the same check for every write, not just reads.
Common mistakes
- Treating serializable and recoverable as the same thing. They are independent properties.
- Calling a dirty write a dirty read. A dirty write breaks strictness, not cascadelessness.
- Ignoring commit order when testing recoverability.
- Missing transitive cascades when listing transactions that must roll back.
Practice questions
Q1. Classify R1(A), W1(A), R2(A), C2, C1.
Answer: T2 reads A written by uncommitted T1 and commits first, so the schedule is irrecoverable.
Q2. Classify W1(A), R1(B), W2(B), C1, C2.
Answer: No item written by an uncommitted transaction is read or written by another one. T2 writes B, which T1 only read. The schedule is strict, and so also cascadeless and recoverable.
Q3. Can a serial schedule be irrecoverable?
Answer: No. In a serial schedule each transaction finishes before the next starts, so there are no dirty reads or writes. Serial schedules are strict.
FAQs
What is a recoverable schedule?
It is a schedule where any transaction that reads data written by another transaction commits only after that other transaction commits.
What is a cascadeless schedule?
It is a schedule with no dirty reads. Transactions read only committed data, so one abort never forces others to abort.
What is the difference between cascadeless and strict schedules?
A cascadeless schedule forbids reading uncommitted data. A strict schedule also forbids overwriting uncommitted data.
Is every serializable schedule recoverable?
No. Serializability is about the effect of interleaving, while recoverability is about commit order after dirty reads. A schedule can have either property without the other.
Does strict 2PL guarantee strict schedules?
Yes. Strict 2PL holds every exclusive lock until commit or abort, so no one can read or overwrite uncommitted data.
Conclusion
For every pair of transactions, look for reads and writes of items written by an uncommitted transaction, then check the commit order. That classifies most schedules in under a minute. Continue with 2PL and timestamp ordering, revise serializability, or go back to the Transactions and Concurrency Control chapter.