With suitable examples, show how recovery in a database system can be done using Log Files with

  • Immediate updation
  • Deferred updation
Added 2 years ago
Active
Viewed 1114
Ans

 

Deferred Update Recovery

  • Also called NO-UNDO/REDO
  • During a transaction, only record the changes to data items in the log.
  • When the transaction commits, actually update the data items on disk.

Two main rules:

  • A transaction cannot change any items in the database until it commits.
  • A transaction may not commit until all the write operations are successfully recorded in the log. This means that we must check to see that the log is actually written to disk.

Recovery:

  • we simply ignore those transactions that did not commit.

Advantages:

  • Recovery is made easier: Any transaction that reached the commit point (from the log) has its writes applied to the database (REDO). All other transactions are ignored
  • Cascading rollback does not occur because no other transaction sees the work of another until it is committed (no stale reads).

Disadvantages:

  • Concurrency is limited: Must employ Strict 2PL which limits concurrency.

atOptions = { 'key': 'a900f2dbf175e78754c26c6231a4b673', 'format': 'iframe', 'height': 90, 'width': 728, 'params': {} };

Related Questions