Engineering Questions with Answers - Multiple Choice Questions

Database MCQ – Recovery

1 - Question

The log is a sequence of _________ recording all the update activities in the database.
a) Log records
b) Records
c) Entries
d) Redo

View Answer

Answer: a
Explanation: The most widely used structure for recording database modifications is the log.




2 - Question

In the ___________ scheme, a transaction that wants to update the database first creates a complete copy of the database.
a) Shadow copy
b) Shadow Paging
c) Update log records
d) All of the mentioned

View Answer

Answer: a
Explanation: If at any point the transaction has to be aborted, the system merely deletes the new copy. The old copy of the database has not been affected.




3 - Question

The ____________ scheme uses a page table containing pointers to all pages; the page table itself and all updated pages are copied to a new location.
a) Shadow copy
b) Shadow Paging
c) Update log records
d) All of the mentioned

View Answer

Answer: b
Explanation: Any page which is not updated by a transaction is not copied, but instead the new page table just stores a pointer to the original page.




4 - Question

The current copy of the database is identified by a pointer, called ____________ which is stored on disk.
a) Db-pointer
b) Update log
c) Update log records
d) All of the mentioned

View Answer

Answer: a
Explanation: Any page which is not updated by a transaction is not copied, but instead the new page table just stores a pointer to the original page.




5 - Question

If a transaction does not modify the database until it has committed, it is said to use the ___________ technique.
a) Deferred-modification
b) Late-modification
c) Immediate-modification
d) Undo

View Answer

Answer: a
Explanation: Deferred modification has the overhead that transactions need to make local copies of all updated data items; further, if a transaction reads a data item that it has updated, it must read the value from its local copy.




6 - Question

If database modifications occur while the transaction is still active, the transaction is said to use the ___________technique.
a) Deferred-modification
b) Late-modification
c) Immediate-modification
d) Undo

View Answer

Answer: c
Explanation: We say a transaction modifies the database if it performs an update on a disk buffer, or on the disk itself; updates to the private part of main memory do not count as database modifications.




7 - Question

___________ using a log record sets the data item specified in the log record to the old value.
a) Deferred-modification
b) Late-modification
c) Immediate-modification
d) Undo

View Answer

Answer: d
Explanation: Undo brings the previous contents.




8 - Question

In the __________ phase, the system replays updates of all transactions by scanning the log forward from the last checkpoint.
a) Repeating
b) Redo
c) Replay
d) Undo

View Answer

Answer: b
Explanation: Undo brings the previous contents.




9 - Question

The actions which are played in the order while recording it is called ______________ history.
a) Repeating
b) Redo
c) Replay
d) Undo

View Answer

Answer: a
Explanation: Undo brings the previous contents.




10 - Question

A special redo-only log record < Ti, Xj, V1> is written to the log, where V1 is the value being restored to data item Xj during the rollback. These log records are sometimes called
a) Log records
b) Records
c) Compensation log records
d) Compensation redo records

View Answer

Answer: c
Explanation: Such records do not need undo information since we never need to undo such an undo operation.

Get weekly updates about new MCQs and other posts by joining 18000+ community of active learners