Advanced Database System Chapter 5
Advanced Database System Chapter 5
Previous Lectures
◼ Transactions(Chapter-3)
◼ Concurrency control(Chapter-4)
This Lecture
◼ Recovery(Chapter-5)
Topics to be covers
◼ Backup and
◼ Log files
If there is a failure
Some transactions must be redone or undone using
different recovery techniques.
5.2. Failures in DBMS
4. Shadow paging
5.6. Database Recovery Techniques(cont.)
1. Log-based recovery:
◼ Any DBMS has its own system logs
◼ System logs have the records for all activity/
transactions/operations that has occurred in the system
◼ All transactions records have their own ID, status, and
timestamps.
5.6. Database Recovery Techniques(cont.)
4. Shadow Paging:
◼ It is recovery technique that is used to recover database.
◼ The idea is to maintain two page tables during the life of a
transaction:
◼ the current page table and
Step 1:
◼ The database system creates a shadow page for each page in the
database.
◼ So, we have two tables,
◼ The current page table and
◼ The shadow page table.
◼ Shadow page table is a copy of the current page table.
Step 2:
◼ When a transaction starts, both the tables look identical,
◼ But, once the transaction started its operations, both tables look
difference, since the current table is updated for each write
operation.
◼ The shadow page is never changed during the life of the transaction.
Database Recovery Techniques(cont.)
Atomicity
Isolation
Durability
Phase-2: Redo
Phase-3: Undo
ARIES Recovery Algorithm(cont…)