What are different types of recoverability of schedules(DBMS)?



If any transaction that performs a dirty read operation from an uncommitted transaction and also its committed operation becomes delayed till the uncommitted transaction is either committed or rollback such type of schedules is called as Recoverable Schedules.

Types of recoverable schedules

There are three types of recoverable schedules which are explained below with relevant examples −

  • Cascading schedules
  • Cascadeless Schedules
  • Strict Schedules.

The types of recoverable schedules are given below in form of a chart −

Recoverable schedule

First, let us see an example of a recoverable schedule.

T1T2
R(X)
W(X)
W(X)
R(X)
commit
Commit

Here, transaction T2 is reading value written by transaction T1 and the commit of T2 occurs after the commit of T1. Hence, it is a recoverable schedule.

Again the recoverable schedule is divided into cascade less and strict schedule.

  • Cascading Schedule

A cascading schedule is classified as a recoverable schedule. A recoverable schedule is basically a schedule in which the commit operation of a particular transaction that performs read operation is delayed until the uncommitted transaction either commits or roll backs.

A cascading rollback is a type of rollback in which if one transaction fails, then it will cause rollback of other dependent transactions. The main disadvantage of cascading rollback is that it can cause CPU time wastage.

Given below is an example of a cascading schedule −

T1T2T3T4
Read(A)
Write(A)
Read (A)
Write(A)
Read(A)
Write(A)
Read(A)
Write(A)
Failure

The above transaction is cascading rollback because of T1 failure, T2 is rollback and rollback of T2 causes T3 to rollback and rollback T3 causes the T4 to rollback.

  • Cascadeless schedule

When a transaction is not allowed to read data until the last transaction which has written it is committed or aborted, these types of schedules are called cascadeless schedules.

Given below is an example of a cascadeless schedule −

T1T2
R(X)
W(X)
W(X)
commit
R(X)
Commit

Here, the updated value of X is read by transaction T2 only after the commit of transaction T1. Hence, the schedule is cascadeless schedule.

  • Strict schedule

Given below is an example of a strict schedule −

T1T2
R(X)
R(X)
W(X)
commit
W(X)
R(X)
Commit

Here, transaction T2 reads and writes the updated or written value of transaction T1 only after the transaction T1 commits. Hence, the schedule is strict schedule.

The recoverable schedules are represented in the diagram below −


Advertisements