Database Questions and Answers – Buffer Management

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

1. In order to reduce the overhead in retrieving the records from the storage space we use
a) Logs
b) Log buffer
c) Medieval space
d) Lower records
View Answer

Answer: b
Explanation: The output to stable storage is in units of blocks.

2. The order of log records in the stable storage ____________ as the order in which they were written to the log buffer.
a) Must be exactly the same
b) Can be different
c) Is opposite
d) Can be partially same
View Answer

Answer: a
Explanation: As a result of log buffering, a log record may reside in only main memory (volatile storage) for a considerable time before it is output to stable storage.

3. Before a block of data in main memory can be output to the database, all log records pertaining to data in that block must have been output to stable storage. This is
a) Read-write logging
b) Read-ahead logging
c) Write-ahead logging
d) None of the mentioned
View Answer

Answer: c
Explanation: The WAL rule requires only that the undo information in the log has been output to stable storage, and it permits the redo information to be written later.
advertisement
advertisement

4. Writing the buffered log to __________ is sometimes referred to as a log force.
a) Memory
b) Backup
c) Redo memory
d) Disk
View Answer

Answer: d
Explanation: If there are insufficient log records to fill the block, all log records in main memory are combined into a partially full block and are output to stable storage.

5. The _______________ policy, allows a transaction to commit even if it has modified some blocks that have not yet been written back to disk.
a) Force
b) No-force
c) Steal
d) No-steal
View Answer

Answer: b
Explanation: No-force policy allows faster commit of transactions.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. ______________ policy allows multiple updates to accumulate on a block before it is output to stable storage, which can reduce the number of output operations greatly for frequently updated blocks.
a) Force
b) No-force
c) Steal
d) No-steal
View Answer

Answer: b
Explanation: No-force policy allows faster commit of transactions.

7. The ___________ policy, allows the system to write modified blocks to disk even if the transactions that made those modifications have not all committed.
a) Force
b) No-force
c) Steal
d) No-steal
View Answer

Answer: c
Explanation: The no-steal policy does not work with transactions that perform a large number of updates.
advertisement

8. Locks on buffer blocks are unrelated to locks used for concurrency-control of transactions, and releasing them in a non-two-phase manner does not have any implications on transaction serializability. This is
a) Latches
b) Swap Space
c) Dirty Block
d) None of the mentioned
View Answer

Answer: a
Explanation: These locks, and other similar locks that are held for a short duration.

9. The __________________ contains a list of blocks that have been updated in the database buffer.
a) Latches
b) Swap Space
c) Dirty Block
d) None of the mentioned
View Answer

Answer: c
Explanation: Dirty blocks are those that have been updated in memory, and the disk version is not up-to-date.
advertisement

10. The operating system reserves space on disk for storing virtual-memory pages that are not currently in main memory; this space is called
a) Latches
b) Swap Space
c) Dirty Block
d) None of the mentioned
View Answer

Answer: b
Explanation: Almost all current-generation operating systems retain complete control of virtual memory.

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.