In this article, we will learn about Recoverability of Schedules in DBMS. A schedule is recoverable if each transaction in the schedule commits only after all the transactions containing the changes it read commit.
Recoverability of Schedules in DBMS
Sometimes a transaction may not execute completely due to a software issue, system crash or hardware failure. In that case, the failed transaction has to be rollback. But some other transactions may also have used value produced by the failed transaction. So we also have to rollback those transactions. This process is called recoverability of schedules.
Different types of recoverability of schedules are
Transaction T1 is executed before T2 hence there is no chance of conflict occur.
R1(x) appears before W1(x) and transaction T1 is committed before T2 i.e. completion of first transaction performed first update on data item x, hence given schedule is recoverable.
Tm->Tn => C2->C3but W3(y) executed before W2(y) which leads to conflicts thus it must be committed before T2 transaction. So given schedule is unrecoverable.
If Tm->Tn => C3->C2 is given in schedule then it will become recoverable schedule.
Note:
A committed transaction should never be rollback. It means that reading value from uncommitted transaction and commit it will enter the current transaction into inconsistent or unrecoverable state this is called Dirty Read problem.
2. Cascadeless Schedule:
When no read or write-write occurs before execution of transaction then corresponding schedule is called cascadeless schedule.
Login/Signup to comment