1/13
ICT502
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Database Recovery
Process of restoring database to a correct state in the event of a failure.
There’s two types of storage, volatile storage and stable storage. How will these storage survive system crashes?
Volatile storage does not survive system crashes.
Stable storage represents information that has been replicated in several nonvolatile storage media with independent failure modes.
Types of failure
System crashes: loss of main memory.
Media failures: loss of parts of secondary storage.
Application software errors.
Natural physical disasters.
Carelessness or unintentional destruction of data or facilities.
Sabotage, or intentional corruption or destruction of data, hardware or software facilities.
What are the two types of storage mentioned?
Volatile (main memory) and nonvolatile (secondary storage).
What is stable storage?
Information replicated in several nonvolatile storage media with independent failure modes.
Recovery facilities (Backing up): What is database backup?
A copy of the database taken regularly and stored separately from the original.
Recovery facilities (Maintaining a journal / log file): What is a log file (journal) used for?
To keep track of changes to the database (INSERT, UPDATE, DELETE) and support recovery.
Recovery facilities (Checkpoint facility): What is a checkpoint?
A point at which all database updates in progress are made permanent (written to disk).
Recovery facilities (Recovery manager): What is the role of the recovery manager?
To restore the database to a consistent state after a failure.
If the database is damaged, what is the recovery process?
Reapply all updates to the backup database using journal.
If the database is inconsistent (but not damaged), what is done?
Undo or redo the updates
Main recovery technique: What is shadow paging?
A method to maintain database consistency by keeping two copies of the database pages:
Current pages: the ones actively being updated.
Shadow pages: a stable copy before the current transaction started.
Main recovery technique: What is deferred update?
Updates are not written to the database until after a transaction has reached its commit point.
Commited: redo from start
Unfinished: do nothing
Main recovery technique: What is immediate update?
Updates are applied to the database as they occured.
Commited: redo from checkpoint
Unfinished: undo from most recent logs