Recoverability of Schedules | Database Management System (DBMS) - Computer Science Engineering (CSE) PDF Download

Recoverability in DBMS

As discussed, a transaction may not execute completely due to hardware failure, system crash or software issues. In that case, we have to roll back the failed transaction. But some other transaction may also have used values produced by the failed transaction. So we have to roll back those transactions as well.

  1. Recoverable Schedules
    Schedules in which transactions commit only after all transactions whose changes they read commit are called recoverable schedules. In other words, if some transaction Tj is reading value updated or written by some other transaction Ti, then the commit of Tj must occur after the commit of Ti.
    Example 1:
    S1: R1(x), W1(x), R2(x), R1(y), R2(y),
             W2(x), W1(y), C1, C2; 
    Given schedule follows order of Ti  Tj => C1 → C2. Transaction T1 is executed before T2 hence there is no chances 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.
    Example 2: Consider the following schedule involving two transactions T1 and T2.Recoverability of Schedules | Database Management System (DBMS) - Computer Science Engineering (CSE)This is a recoverable schedule since T1 commits before T2, that makes the value read by T2 correct.
  2. Irrecoverable Schedule
    The table below shows a schedule with two transactions, T1 reads and writes A and that value is read and written by T2. T2 commits. But later on, T1 fails. So we have to rollback T1. Since T2 has read the value written by T1, it should also be rollbacked. But we have already committed that. So this schedule is irrecoverable schedule. When Tj is reading the value updated by Ti and Tj is committed before committing of Ti, the schedule will be irrecoverable.Recoverability of Schedules | Database Management System (DBMS) - Computer Science Engineering (CSE)
  3. Recoverable with Cascading Rollback
    The table below shows a schedule with two transactions, T1 reads and writes A and that value is read and written by T2. But later on, T1 fails. So we have to rollback T1. Since T2 has read the value written by T1, it should also be rollbacked. As it has not committed, we can rollback T2 as well. So it is recoverable with cascading rollback. Therefore, if Tj is reading value updated by Ti and commit of Tj is delayed till commit of Ti, the schedule is called recoverable with cascading rollback.Recoverability of Schedules | Database Management System (DBMS) - Computer Science Engineering (CSE)
  4. Cascadeless Recoverable Rollback
    The table below shows a schedule with two transactions, T1 reads and writes A and commits and that value is read by T2. But if T1 fails before commit, no other transaction has read its value, so there is no need to rollback other transaction. So this is a Cascadeless recoverable schedule. So, if Tj reads value updated by Ti only after Ti is committed, the schedule will be cascadeless recoverable.Recoverability of Schedules | Database Management System (DBMS) - Computer Science Engineering (CSE)
The document Recoverability of Schedules | Database Management System (DBMS) - Computer Science Engineering (CSE) is a part of the Computer Science Engineering (CSE) Course Database Management System (DBMS).
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)
62 videos|66 docs|35 tests

Top Courses for Computer Science Engineering (CSE)

FAQs on Recoverability of Schedules - Database Management System (DBMS) - Computer Science Engineering (CSE)

1. What is recoverability in DBMS?
Ans. Recoverability in DBMS refers to the ability to restore the database to a consistent state after a failure or crash. It ensures that the database can be recovered to a state that is valid and reflects the transactions that were committed before the failure occurred.
2. What are schedules in DBMS?
Ans. Schedules in DBMS refer to the order in which transactions are executed in a database system. It represents the chronological order of operations performed by the transactions, including read and write operations on the database.
3. How does recoverability impact the reliability of a database system?
Ans. Recoverability plays a crucial role in ensuring the reliability of a database system. It provides mechanisms to recover the database to a consistent state after failures or crashes, thereby minimizing the risk of data loss or corruption. It helps in maintaining the integrity and availability of the database, making it a reliable system.
4. What are the different levels of recoverability in DBMS?
Ans. There are four levels of recoverability in DBMS: - Strict recoverability: It guarantees that a transaction cannot be committed if it reads a data item that is later updated by another transaction that has not yet committed. - Recoverability: It ensures that a transaction cannot be committed if it reads a data item that is later updated by another transaction that has been rolled back. - Cascadeless recoverability: It ensures that a transaction cannot be committed if it reads a data item that is later updated by another transaction that has been rolled back due to a cascading rollback. - No cascading rollback: It guarantees that a transaction cannot be committed if it reads a data item that is later updated by another transaction that has been rolled back due to a cascading rollback, and also prevents cascading rollbacks.
5. How can recoverability be achieved in DBMS?
Ans. Recoverability in DBMS can be achieved through techniques such as logging and checkpointing. Logging involves recording all the changes made to the database during the execution of transactions, which allows for undo and redo operations during recovery. Checkpointing involves periodically saving the state of the database system, including committed transactions and their corresponding log records, which helps in recovering the database to a consistent state in case of failures.
62 videos|66 docs|35 tests
Download as PDF
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Semester Notes

,

video lectures

,

Extra Questions

,

past year papers

,

MCQs

,

mock tests for examination

,

Summary

,

Objective type Questions

,

practice quizzes

,

Previous Year Questions with Solutions

,

ppt

,

Viva Questions

,

Important questions

,

pdf

,

Recoverability of Schedules | Database Management System (DBMS) - Computer Science Engineering (CSE)

,

shortcuts and tricks

,

Sample Paper

,

study material

,

Recoverability of Schedules | Database Management System (DBMS) - Computer Science Engineering (CSE)

,

Exam

,

Free

,

Recoverability of Schedules | Database Management System (DBMS) - Computer Science Engineering (CSE)

;