15 Recovery Techniques Flashcards

(23 cards)

1
Q

What is the purpose of recovery techniques in databases?

A

To restore the database to a correct state after system crashes or transaction errors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the system log record?

A

All actions performed by transactions, used for undo/redo during recovery.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a checkpoint in database recovery?

A

A saved consistent state of the database to speed up recovery after a crash.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a commit point?

A

When a transaction is successfully completed and all its changes become permanent.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What happens if a system crashes after a commit point?

A

The committed transaction is redone, not undone.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a catastrophic failure?

A

A severe failure where the DB must be restored from an external backup.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a non-catastrophic failure?

A

A crash that makes the DB inconsistent but can be fixed using undo/redo actions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are immediate updates?

A

Changes are applied to the database right away, before the transaction commits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are deferred updates?

A

Changes are delayed until the transaction commits, ensuring consistency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why don’t deferred updates need undo actions?

A

Because no changes are applied unless the transaction commits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is buffering?

A

Making updates in main memory before writing to disk.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is caching in database recovery?

A

Loading disk pages into memory before updating.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is cascading rollback?

A

When one transaction’s failure causes others to fail because they depended on its changes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does [start-transaction, T] mean in a system log?

A

Marks the beginning of transaction T.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does [write-item, T, X, oldvalue, newvalue] mean in a system log?

A

T updated item X from oldvalue to newvalue.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does [commit, T] mean in a system log?

A

Transaction T finished successfully; changes are permanent.

17
Q

What does [abort, T] mean in a system log?

A

Transaction T failed and was rolled back.

18
Q

What is the rule for handling transactions during recovery?

A

Undo uncommitted transactions; redo committed ones.

19
Q

When is a transaction considered committed?

A

When [commit, T] is written in the log.

20
Q

What is the problem with storing logs in main memory?

A

They are lost in a crash unless written to disk.

21
Q

How do we prevent loss of log data in memory?

A

Force writing logs to disk before applying changes.

22
Q

What does a [checkpoint] entry in the log do?

A

Marks a point from which recovery can start, skipping earlier transactions.

23
Q

What are the steps to take a checkpoint?

A

Pause transactions, write changes to disk, log the checkpoint, resume transactions.