Posts

What is a Recoverability

1 min read

 

Recoverability of Schedule

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 transaction may also have used value produced by the failed transaction. So we also have to rollback those transactions.


DBMS Recoverability of Schedule

The above table 1 shows a schedule which has two transactions. T1 reads and writes the value of A and that value is read and written by T2. T2 commits but later on, T1 fails. Due to the failure, we have to rollback T1. T2 should also be rollback because it reads the value written by T1, but T2 can't be rollback because it already committed. So this type of schedule is known as irrecoverable schedule.

Irrecoverable schedule: The schedule will be irrecoverable if Tj reads the updated value of Ti and Tj committed before Ti commit.


DBMS Recoverability of Schedule

The above table 2 shows a schedule with two transactions. Transaction T1 reads and writes A, and that value is read and written by transaction T2. But later on, T1 fails. Due to this, we have to rollback T1. T2 should be rollback because T2 has read the value written by T1. As it has not committed before T1 commits so we can rollback transaction T2 as well. So it is recoverable with cascade rollback.

Recoverable with cascading rollback: The schedule will be recoverable with cascading rollback if Tj reads the updated value of Ti. Commit of Tj is delayed till commit of Ti.


DBMS Recoverability of Schedule

The above Table 3 shows a schedule with two transactions. Transaction T1 reads and write A and commits, and that value is read and written by T2. So this is a cascade less recoverable schedule.H,HM

You may like these posts

  • Query List21. Query to display Name, Department Name and Department No for all the employees. Query: Select EMPLOYEE.Ename, DEPARTMENT.Dname, EMPLOYEE.Dno from EMPLOYEE …
  •  Query List11. Query to display the Name, Salary and Commission for all the employees who earn commission. Sort the data in descending order of Salary and Commission. Q…
  •  Query List16. Query to display Name, Hire Date and Salary Review Date which is the 1st Monday after six months of employment. Query: Select Ename, Hire_date, Salar…
  • Query List26. Query to display Name, Dept No. and Salary of any employee whose department No. and Salary match both the department no. and the salary of any employee who earns a …
  • Query List31. Query to display the Department Name, Location Name, No. of Employees and the average salary for all employees in that department.  Query 1: Select Dn…
  •  Query List6. Query to display Employee Name and Department Number for the Employee No = E90. Query: Select Ename, Dno from EMPLOYEE where Eno='E90'; Output:7.…

Post a Comment

© 2025DBMS. The Best Codder All rights reserved. Distributed by