Database Questions and Answers – Recovery

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Recovery”.

1. 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. 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. 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.
advertisement
advertisement

4. 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. 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. 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. ____________ 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.
advertisement

8. 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. 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.
advertisement

10. 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.

Sanfoundry Global Education & Learning Series – Database Management System.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.