Why Recovery?
-
Computers fail (power cut, hardware crash, software bug, fire, sabotage).
-
Database must maintain ACID (Atomicity, Consistency, Isolation, Durability).
-
Goal: Bring DB back to consistent state, with minimum downtime.
Types of Failures:
-
Transaction Failure
-
Logical errors → e.g., invalid input, divide by zero, resource limit exceeded.
-
System errors → e.g., deadlock (transactions waiting forever).
-
-
System Crash
-
Main memory lost (volatile).
-
Disk data safe (nonvolatile).
-
Based on fail-stop assumption → crash stops system but doesn’t corrupt disk.
-
-
Disk Failure
-
Physical disk damage (head crash, transfer error).
-
Recovery: Mirroring, backups (DVD, tape, cloud)
-