lec3
lec3
lec3
1. Recoverable schedules
2. Cascading rollback
3. Strict schedule
Recoverable schedules
• once a transaction T is committed, it should
never be necessary to roll back T. This ensures
that the durability property of transactions is
not violated.
• Recoverable schedules: The schedules that
theoretically meet this criterion.
• A schedule where a committed transaction
may have to be rolled back during recovery is
called nonrecoverable and hence should not
be permitted by the DBMS.
• Note:
If r2(X) came after w1(X), then c1 should be
executed before c2 to be recoverable.
Example:
Sa: r1(X); r2(X); w1(X); r1(Y); w2(X); c2; w1(Y); c1;
Sa is recoverable, , even though it suffers from
the lost update problem; this problem is
handled by serializability theory.
• Sc: r1(X); w1(X); r2(X); r1(Y); w2(X); c2; a1;
Sc is not recoverable because T2 reads item X
from T1, but T2 commits before T1 commits.
• Unrecoverable schedule
S2: R1(x), R2(x), R1(z), R3(x), R3(y), W1(x),W3(y),
R2(y), W2(z), W2(y), C1, C2, C3;
• Cascadeless schedule
S3: R1(x), R2(z), R3(x), R1(z), R2(y), R3(y), W1(x),
C1,
W2(z), W3(y), W2(y), C3, C2;
• Strict Schedule
S4: R1(x), R2(x), R1(z), R3(x), R3(y), W1(x), C1,
W3(y), C3, R2(y), W2(z), W2(y), C2;