Backup and Recovery Flashcards

1
Q

What are the 3 storage structures that a database uses?

A

Primary : Volatile data where data is operated on.
Secondary : Non-volatile data storage such as that on disk.
Stable : Backup data stored from the primary storage.

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

What is a checkpoint? What operations does a checkpoint conduct upon creation?

A

A point of synchronisation between database and log file. Operations: Write log file to secondary storage;
Write a checkpoint record to the log file containing currently active transactions; UNDO; REDO.

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

What happens when a failure occurs?

A

The system checks the log file in reverse back to the last checkpoint. System can then REDO all transactions that
committed since last checkpoint, or UNDO all transactions that were active at the time of crash.

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

What is a backup? And what are backup points?

A

A backup is an accessible previous state of the database. Backup points are accessible backups throughout the lifecycle of the database.

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

What are the 3 types of backups? Define each…

A

Full backup : Backsup entire database.
Differential backup : Backs up changes since last full backup.
Incremental backup : Backs up changes since last incremental backup.

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

Define recovery…

A

Recovery is the restoration of the database to a correct state.

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

Explain how the log based recovery protocol works…

A

Log based recovery keeps a log of all transactions, and implements checkpoints into the log file at pre-determined
intervals. Each checkpoint maps to a previous database state that the current database can be restored to.

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

What are the 2 operations that can be performed while using a log based recovery protocol? Explain them…

A

REDO : System can REDO all committed transactions since last checkppoint (after system failure)
UNDO : System can UNDO all active transactions at (time of crash) in the reverse order of the log file.

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

What is meant by a deferred update? What operations does it have?

A

Deferred Update : Logs of uncommitted transactions are made and pushed to the log file.
Once a commit is made the logged transactions complete. This only has a REDO operation, which is used to complete the uncommitted transactions.

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

What is meant by immediate update? What operations does it have?

A

Immediate Update : Transactions immediately update the database, and don’t have to wait for a commit. Has REDO and UNDO operations in case of system failure.

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

Explain how the UNDO and REDO operations work for immediate update…

A

If a system has an immediate update recovery scheme and crashes, the REDO operation can recomplete all transactions since last update in the correct order. The UNDO operation can undo active transactions in reverse log file order.

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

Explain shadow paging…

A

Shadow paging is an alternative backup and recovery method, in which 2 tables are concurrently maintained. The current database and the shadow database. During each transaction, the current page table is copied and stored in the shadow page table, providing a backup in case an error occurs.

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

What are the pros and cons of shadow paging?

A

Pros : No log file maintenance; Faster recovery due to no UNDO / REDO operations.
Cons : Data fragmentation (scattered); Needs garbage collection to collect inaccessible data.

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