tailieunhanh - Lecture Database system concepts (6/e): Chapter 16 - Silberschatz, Korth, Sudarshan

Chapter 16 - Recovery system. This chapter covers the primary techniques for ensuring correct transaction execution despite system crashes and storage failures. These techniques include logs, checkpoints, and database dumps. The widely-used ARIES algorithm is presented. | Chapter 16: Recovery System Database System Concepts, 6th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-use Chapter 16: Recovery System Failure Classification Storage Structure Recovery and Atomicity Log-Based Recovery Remote Backup Systems Database System Concepts - 6th Edition ©Silberschatz, Korth and Sudarshan Failure Classification Transaction failure : Logical errors: transaction cannot complete due to some internal error condition System errors: the database system must terminate an active transaction due to an error condition (., deadlock) System crash: a power failure or other hardware or software failure causes the system to crash. Fail-stop assumption: non-volatile storage contents are assumed to not be corrupted by system crash Database systems have numerous integrity checks to prevent corruption of disk data Disk failure: a head crash or similar disk failure destroys all or part of disk storage Destruction is assumed to be detectable: disk drives use checksums to detect failures Database System Concepts - 6th Edition ©Silberschatz, Korth and Sudarshan Recovery Algorithms Consider transaction Ti that transfers $50 from account A to account B Two updates: subtract 50 from A and add 50 to B Transaction Ti requires updates to A and B to be output to the database. A failure may occur after one of these modifications have been made but before both of them are made. Modifying the database without ensuring that the transaction will commit may leave the database in an inconsistent state Not modifying the database may result in lost updates if failure occurs just after transaction commits Recovery algorithms have two parts 1. Actions taken during normal transaction processing to ensure enough information exists to recover from failures 2. Actions taken after a failure to recover the database contents to a state that ensures atomicity, .