Database Questions and Answers – Database Buffer

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

1. The _______ is that part of main memory available for storage of copies of disk blocks.
a) Buffer
b) Catalog
c) Storage
d) Secondary storage
View Answer

Answer: a
Explanation: There is always a copy kept on disk of every block, but the copy on disk may be a version of the block older than the version in the buffer.

2. A major goal of the database system is to minimize the number of block transfers between the disk and memory. This is achieved by
a) Buffer
b) Catalog
c) Storage
d) Secondary storage
View Answer

Answer: a
Explanation: There is always a copy kept on disk of every block, but the copy on disk may be a version of the block older than the version in the buffer.

3. The subsystem responsible for the allocation of buffer space is called the ___________
a) Buffer
b) Buffer manager
c) Storage
d) Secondary storage
View Answer

Answer: b
Explanation: Programs in a database system make requests (that is, calls) on the buffer manager when they need a block from disk.
advertisement
advertisement

4. In the buffer where there is no space for another block, the block can be inserted using
a) Pinned block strategy
b) Forced output block
c) Buffer replacement strategy
d) All of the mentioned
View Answer

Answer: c
Explanation: Most operating systems use a least recently used (LRU) scheme, in which the block that was referenced least recently is written back to disk and is removed from the buffer.

5. A block that is not allowed to be written back to disk is said to be ______________
a) Pinned
b) Forced
c) Buffer
d) All of the mentioned
View Answer

Answer: a
Explanation: Although many operating systems do not support pinned blocks, such a feature is essential for a database system that is resilient to crashes.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. There are situations in which it is necessary to write back the block to disk, even though the buffer space that it occupies is not needed. This write is called the
a) Pinned block strategy
b) Forced output block
c) Buffer replacement strategy
d) All of the mentioned
View Answer

Answer: b
Explanation: The main-memory contents and thus buffer contents are lost in a crash, whereas data on disk usually survive a crash.

7. The frequently used buffer replacement strategy is
a) Most recently used
b) Least recently used
c) Longest block
d) All of the mentioned
View Answer

Answer: b
Explanation: If a block must be replaced, the least recently referenced block is replaced.
advertisement

8. In case the buffer manager do not write the blocks properly then the buffer manager uses
a) Replacement strategy
b) Forced strategy
c) Crash recovery system
d) Both Replacement and Forced strategy
View Answer

Answer: c
Explanation: The crash-recovery subsystem imposes stringent constraints on block replacement.

9. The technique where the blocks which have been used are replaced is called
a) Replacement strategy
b) Forced strategy
c) Crash recovery system
d) Most recently used
View Answer

Answer: d
Explanation: The optimal strategy for block replacement is the most recently used (MRU) strategy.
advertisement

10. ___________________ frees the space occupied by a block as soon as the final tuple of that block has been processed.
a) Replacement strategy
b) Forced strategy
c) Toss immediate strategy
d) Most recently used
View Answer

Answer: c
Explanation: The optimal strategy for block replacement is the most recently used (MRU) strategy.

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.