tailieunhanh - Chapter 6: Database Recovery Techniques
Chapter 6: Database Recovery Techniques includes Databases Recovery (Purpose of Database Recovery, Types of Failure, Transaction Log, Data Updates, Data Caching, Transaction Roll-back, Checkpointing, Recovery schemes, ARIES Recovery Scheme, Recovery in Multidatabase System). | Chapter 6 Database Recovery Techniques Adapted from the slides of “Fundamentals of Database Systems” (Elmasri et al., 2003) 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 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. Database Recovery 2 Types of Failure The database may become unavailable for use due to Transaction failure: Transactions | Chapter 6 Database Recovery Techniques Adapted from the slides of “Fundamentals of Database Systems” (Elmasri et al., 2003) 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 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. 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. 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. 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 .
đang nạp các trang xem trước