ch19-Database Recovery Techniques

ch19-Database Recovery Techniques - Copyright 2007 Ramez...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Slide 19- 1 Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 19 Database Recovery Techniques
Background image of page 2
Slide 19- 3 Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 19 Outline Databases Recovery 1. Purpose of Database Recovery 2. Types of Failure 3. Transaction Log 4. Data Updates 5. Data Caching 6. Transaction Roll-back (Undo) and Roll-Forward 7. Checkpointing 8. Recovery schemes 9. ARIES Recovery Scheme 10. Recovery in Multidatabase System
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Slide 19- 4 Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Database Recovery 1 Purpose of Database Recovery To bring the database into the last consistent state, which existed prior to the failure. To preserve transaction properties (Atomicity, Consistency, Isolation and Durability). Example: If the system crashes before a fund transfer transaction completes its execution, then either one or both accounts may have incorrect value. Thus, the database must be restored to the state before the transaction modified any of the accounts.
Background image of page 4
Slide 19- 5 Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Database Recovery 2 Types of Failure The database may become unavailable for use due to Transaction failure : Transactions may fail because of incorrect input, deadlock, incorrect synchronization. System failure : System may fail because of addressing error, application error, operating system fault, RAM failure, etc. Media failure : Disk head crash, power disruption, etc.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Slide 19- 6 Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Database Recovery 3 Transaction Log For recovery from any type of failure data values prior to modification (BFIM - BeFore Image) and the new value after modification (AFIM – AFter Image) are required. These values and other information is stored in a sequential file called Transaction log. A sample log is given below. Back P and Next P point to the previous and next log records of the same transaction. T ID Back P Next P Operation Data item BFIM AFIM T1 0 1 T1 1 4 T2 0 8 T1 2 5 T1 4 7 T3 0 9 T1 5 nil Begin Write W R R End Begin X Y M N X = 200 Y = 100 M = 200 N = 400 X = 100 Y = 50 M = 200 N = 400
Background image of page 6
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Database Recovery 4 Data Update Immediate Update : As soon as a data item is modified in cache, the disk copy is updated. Deferred Update : All modified data items in the cache is written either after a transaction ends its execution or after a fixed number of transactions have completed their execution. Shadow update : The modified version of a data item does not overwrite its disk copy but is written at a separate disk location. In-place update
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/23/2012 for the course CS 348 taught by Professor Staff during the Fall '08 term at Purdue University-West Lafayette.

Page1 / 37

ch19-Database Recovery Techniques - Copyright 2007 Ramez...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online