Tuesday, April 17, 2018

Cascadeless schedule in database transaction management

Cascadeless schedule in database transaction management

Cascadeless schedule:
A schedule that eliminates cascading rollback of transactions when a failure occurs is called cascadeless schedule. If there are no dirty reads in a schedule, then that schedule will be a cascadeless schedule.

  • Every cascadeless schedule is recoverable schedule.

How do we avoid cascading rollback?
If two transactions T1 and T2 are in a schedule S, and T2 consumes the data written by T1 (we say T2 is dependent on T1), then we must ensure that T1 commits before T2 commits. If this situation is ensured then we have avoided cascading rollback.

Discussion:
It is an important property that would save time and other resources in database transaction management.
At first place, we need the schedules to be recoverable schedules. Recoverability does not ensure cascadeless schedule. Even if a schedule is recoverable, we may need to rollback several transactions in case if a transaction Ti fails and other transactions have consumed the data written by Ti.

Example 1:
Is the following schedule is cascadeless or not?
Instruction
T1
T2
1
2
3
4
5
6
R(x)

W(y)

Commit

R(x)

W(y)

Commit
This schedule is cascadeless because there is no dirty read. 

Example 2:
Is the following schedule is cascadeless or not?
Instruction
T1
T2
T3
1
2
3
4
5
6
R(x)
R(y)
W(x)





R(x)
W(x)





R(x)
This schedule is said to be a partial schedule as it does not consist of either commit or abort statements. In this schedule, if T1 fails and aborted then T2 which is dependent on T1 has to be rolled back and T3 which is dependent on T2 has also to be rolled back. This type of rollback is called as cascading rollback. Hence, this schedule is not a cascadeless schedule.

***************


 
 









what is cascadeless schedule
define cascading rollback
explain with an example the cascadeless schedule
purpose of cascadeless schedule
Example of cascadeless schedule
why all recoverable schedules are not cascadeless schedules?
all cascadeless schedules are recoverable schedules

No comments:

Post a Comment

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents

data recovery