Skip to content

Failure Recovery

低頻~26 min5 terms9 past questions

Goals of this unit

  • Explain why a checkpoint serves as the starting point for recovery.
  • Tell rollback and rollforward apart by the transactions they act on and the records they use.
  • Match backward recovery and forward recovery to the operation each name refers to.
Terms at a glance (5)
TermIn one lineDirection of recoveryMain record used
チェックポイントThe operation, or the moment, of writing in-memory updates to disk in one goNo direction; it fixes where recovery startsData on disk and the log
ロールバックThe operation that undoes the updates of a transaction that did not finish normallyGoes back in timeBefore-update values in the log
バックワードリカバリThe recovery method that returns data to its pre-processing state by rollback (backward restoration)Goes back in timeBefore-update values in the log
ロールフォワードThe operation that reapplies updates to data from an earlier point to move it forwardMoves forward in timeA backup or similar copy plus after-update values in the log
フォワードリカバリThe recovery method that brings data forward to its state just before the failure by rollforward (forward restoration)Moves forward in timeA backup or similar copy plus after-update values in the log

Terms

チェックポイントCheckpoint

Open in glossary チェックポイント

A checkpoint (チェックポイント) is the operation of writing updates held in memory out to disk all at once, or the moment at which that operation is carried out.

  1. Hold updates in memory
  2. Write to disk at a checkpoint
  3. A failure occurs
  4. Recover from the latest checkpoint

Recovery starts from the latest checkpoint, so updates made before it do not have to be redone.

4 / 4

To speed up processing, the DBMS does not write updates to disk right away but first holds them in a buffer in memory. When checkpoints are taken at regular intervals, every update up to that moment is already reflected on disk. After a failure that stops the system but leaves the disk intact, recovery can start from the latest checkpoint instead of tracing the log, the record of updates written in order, all the way from the beginning.

AnalogyIt is like making a clean copy of your household account book at the end of each month: if you spot a mistake, you only need to recheck from the most recent month-end.

How to rememberCheck plus point: the point at which you have confirmed the updates are on disk.

Exam points

  • ExamThe word checkpoint (チェックポイント) can mean either the operation of writing updates to disk all at once or the moment that operation is performed.
  • Mix-upA commit (コミット) finalizes the result of a single transaction. A checkpoint (チェックポイント) has nothing to do with when individual transactions end; it reflects updates on disk at regular intervals.

2 past questions on this term チェックポイント

ロールバックRollback

Open in glossary ロールバック

A rollback (ロールバック) is the operation that cancels the updates of a transaction that did not finish normally and restores the data to what it was before that processing began.

  1. Transaction starts
  2. Some items updated
  3. Abnormal end midway
  4. Restore with before-update values

The before-update values in the log are written back, returning the data to its state before the transaction began.

4 / 4

The undo uses the before-update values saved in the log to put each rewritten item back to its original value. It is carried out not only after failures but also when a transaction stops midway because of a program error or a user cancellation. As a result, a half-finished set of updates is never left in the database.

AnalogyIt is like making a mistake halfway through filling in an application form, throwing that sheet away, and starting again from a blank one.

How to rememberRoll back means to rewind. Back points backward, which ties it to backward restoration.

Exam points

  • ExamIn a rollback (ロールバック), every rewrite made up to that point returns to its original value, so no partially applied state remains.
  • ExamA rollback removes only the updates made by the transaction that ended abnormally. Updates from transactions that had already been committed (コミット) before then stay as they are.
  • Mix-upA commit (コミット) finalizes the updates of a transaction that ended normally, while a rollback (ロールバック) cancels the updates of a transaction that did not finish.

3 past questions on this term ロールバック

バックワードリカバリBackward Recovery

Open in glossary バックワードリカバリ

Backward recovery (バックワードリカバリ) is the recovery method that takes the database back to its state before processing by means of rollback, and it is also called backward restoration (後退復帰).

Starting from the current database, it applies the before-update values in the log from the newest onward, tracing time in reverse. The operation itself is simply a rollback, and backward recovery is a name that focuses on the direction of recovery.

Exam points

  • ExamUpdates can be undone even when a transaction fails midway because the history of those updates is recorded in the log (ログ).

2 past questions on this term バックワードリカバリ

ロールフォワードRollforward

Open in glossary ロールフォワード

A rollforward (ロールフォワード) is the operation that reapplies, in order, the updates kept in the log to a database from an earlier point, bringing it forward to its state just before the failure.

  1. Disk fails
  2. Restore the backup
  3. Apply after-update values from the log in order
  4. State just before the failure

All committed updates are reflected, and the data matches its state just before the failure.

4 / 4

When a disk breaks and data is lost, for example, the regularly taken backup is restored first, but that alone leaves out the updates made after the backup. The after-update values recorded in the log are then written in from oldest to newest, reproducing the results of the committed transactions.

AnalogyIt is like losing a spreadsheet file, opening the copy from the day before, and retyping everything entered since then by checking your notes.

How to rememberRoll forward means to roll ahead. Forward points ahead, which ties it to forward restoration.

Exam points

  • ExamIn failure recovery, the material for reproducing the updates made after a backup (バックアップ) was taken is the log (ログ), which records what was updated.

2 past questions on this term ロールフォワード

Rollback vs. Rollforward

AspectRollbackRollforward
Key differenceTargetTransactions that did not finish normallyCommitted transactions
Starting pointThe current databaseData from an earlier point, such as a backup
Log values usedBefore-update valuesAfter-update values
Direction in timeBackward (backward restoration)Forward (forward restoration)

フォワードリカバリForward Recovery

Open in glossary フォワードリカバリ

Forward recovery (フォワードリカバリ) is the recovery method that brings the database forward to its state just before the failure by means of rollforward, and it is also called forward restoration (前進復帰).

Its starting point is data from an earlier moment, such as a backup, and it moves forward through time using the after-update values in the log. The operation is the same as a rollforward; this name simply reflects the forward direction.

Exam points

  • Mix-upWhen the data itself is lost because a disk is damaged, forward recovery (フォワードリカバリ) is used. Backward recovery (バックワードリカバリ) assumes the current database is intact and still usable.

1 past questions on this term フォワードリカバリ

Key points

  • Once in-memory updates are written to disk at a checkpoint, recovery can begin from that point.
  • Rollback is the operation behind backward recovery, undoing updates with the before-update values in the log.
  • Rollforward is the operation behind forward recovery, reapplying the after-update values in the log to data from an earlier point.
  • The log is what recovery relies on; a backup alone cannot reproduce the updates made after it was taken.

Check questions

4 past questions from this unit

Start the check questions

All past questions in this topic