/    /  DBMS- Cascadeless Schedule

Cascadeless Schedule

 

If a schedule is recoverable, then to recover correctly from the failure of a transaction Ti, we have to roll back many transactions.

 

Such a situation occurs if transactions have read data written by Ti.

 Example-1: Consider the following partial schedule.

T1T2T3
Read A

Read B

Write A

Read A

Write A

Read A
abort

 

Here, T1 writes a value of A that is read by traction T2.

And T2 writes a value of A that is read by transaction T3.

 

Now, let us suppose that T1 fails. So, T1 must be rolled back.

Since T2 is dependent on T2, T2 must be rolled back. Since T3 is dependent on T2, T3 must be rolled back.

 

This situation, where a single transaction failure leads to a series of transaction rollbacks, is called ‘Cascading Rollback’. Here, ‘Cascading Rollback’ is unwanted, since it leads to the undoing of a significant amount of work.

 

So, it is desirable to restrict the schedules to those where the occurrence of cascading rollbacks is not possible.

Such schedules are called ‘cascadeless schedules’.

 

A cascadeless schedule is a schedule where, for each pair of transactions Ti and Tj such that Tj reads a data item previously written by Ti, the commit operation of Ti appears before the read operation of Tj.

 

Reference Link

Cascadeless Schedule