Database Recovery Techniques

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/24

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering core database recovery concepts, logging protocols, cache management strategies, checkpointing methods, and algorithm specifications from Chapter 22 of Fundamentals of Database Systems.

25 Terms

1
New cards

Recovery Process

  • Restores the database to the most recent consistent state

    • before the time of failure

      • using information kept in the system log.


2
New cards

Deferred Update

  • Physical database on disk is not updated

    • until after the transaction completes successfully

      • and reaches its commit point.


3
New cards

Immediate Update

  • Database may be updated

    • by some operations of a transaction

      • before it reaches its commit point,

        • with all operations recorded in the log.


4
New cards

Idempotent Operation

  • Property of undo/redo (and the entire recovery process)

  • Executing them multiple times is equivalent to executing them just once.


5
New cards

DBMS Cache

  • Collection of in-memory buffers

  • Used for caching disk blocks


6
New cards

Cache Directory

Keeps track of which database items currently reside in the cache buffers.

7
New cards

Dirty Bit

  • Bit associated with each buffer in the cache

  • Indicates whether the buffer has been modified

(if it equals 11, the buffer contents must be written back to disk before being flushed)

8
New cards

Pin-Unpin Bit

  • A status bit associated with a cache page

  • Indicates whether the page is pinned

    • and therefore cannot be written back to disk yet


9
New cards

In-Place Updating

  • Writing the cache buffer back to the same disk location

  • Overwrites the old values of any changed data items.


10
New cards

Shadowing

  • Writes an updated buffer to a different disk location

  • For maintaining multiple versions of data items

(not typically used in practice)

11
New cards

Before-Image (BFIM)

The old value of a data item prior to an update operation.

12
New cards

After-Image

The new value of a data item after an update operation.

13
New cards

Write-Ahead Logging (WAL)

  • Protocol

  • Ensures that the before-image (BFIM) is recorded

    • and the corresponding log entry is flushed to disk

      • before the disk block is overwritten,

        • making UNDO possible if needed.


14
New cards

No-Steal Approach

  • Buffer management policy

  • Cache buffer page updated by a transaction

    • cannot be written to disk

      • before the transaction commits.


15
New cards

Steal Approach

  • Buffer management policy

  • Allows the recovery protocol

    • to write an updated cache buffer to disk

      • before the transaction commits.


16
New cards

Force Approach

  • Policy

  • Requires all pages updated by a transaction

    • to be immediately written to disk

      • before the transaction commits.


17
New cards

No-Force Approach

  • Policy

  • Pages updated by a transaction

    • do not have to be immediately written to disk

      • prior to the transaction committing.


18
New cards

Steal/No-Force Strategy

  • Employed by database systems

  • Avoiding requiring very large buffer spaces

  • Reducing disk I/O operations for heavily updated pages


19
New cards

Checkpoint

  • Recovery mechanism

  • Temporarily suspends transaction execution

  • Force-writes all modified buffers to disk

  • Force-writes a checkpoint record to the log.


20
New cards

Fuzzy Checkpointing

  • System resumes transaction processing

    • after a begin_checkpoint record is written to the log

  • Maintains the previous checkpoint

    • until an end_checkpoint record is written.


21
New cards

Cascading Rollback

  • A scenario where the rollback of a transaction TT

    • forces any transaction SS

      • that read an item value written by TT

        • to also be rolled back.


22
New cards

Shadow Paging

  • NO-UNDO/NO-REDO recovery technique

  • Disk is treated as nn fixed-size pages

  • An unmodified shadow directory is maintained

    • alongside a current directory.


23
New cards

ARIES Recovery Algorithm

Used in many IBM relational database products that employs a:

  • steal/no-force approach

  • write-ahead logging

  • repeating history during REDO

  • logging changes during UNDO


24
New cards

Log Sequence Number (LSN)

  • An identifier associated with every log record

  • Indicates the disk address of the record

  • Corresponds to a specific change made by a transaction.


25
New cards

Two-Phase Commit Protocol

  • A protocol followed by a global coordinator in multidatabase systems

  • Consists of Phase 1 (Prepare for commit) and Phase 2 (Issue commit signal) to ensure all participating databases commit or none do.