MongoDB Questions and Answers – Production MongoDB

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

1. Which of the following storage engine is supported by default?
a) MMAPv1
b) WiredTiger
c) WirelessTiger
d) All of the mentioned
View Answer

Answer: a
Explanation: MongoDB includes support for two storage engines: MMAPv1, the storage engine available in previous versions of MongoDB, and WiredTiger.

2. Point out the correct statement.
a) Replica set configuration is complex
b) MongoDB includes support for two storage engines
c) MongoDB includes support for more than three storage engines
d) All of the mentioned
View Answer

Answer: b
Explanation: MMAPv1 provides collection-level locking.

3. All collections have a unique ________ lock that allows multiple clients to modify documents in different collections at the same time.
a) writer
b) readers-writer
c) readers
d) all of the mentioned
View Answer

Answer: b
Explanation: Each database has a readers-writer lock that allows concurrent read access to a database, but gives exclusive access to a single write operation per database.

advertisement
advertisement

4. _________ supports concurrent access by readers and writers to the documents in a collection.
a) MMAPv1
b) WiredTiger
c) WirelessTiger
d) All of the mentioned
View Answer

Answer: b
Explanation: Clients can read documents while write operations are in progress, and multiple threads can modify different documents in a collection at the same time.

5. MongoDB uses ________ logging to an on-disk journal.
a) write ahead
b) read ahead
c) write once
d) read only
View Answer

Answer: a
Explanation: Leave journaling enabled in order to ensure that mongod will be able to recover its data files and keep the data files in a valid state following a crash.

6. _______ concern describes the guarantee that MongoDB provides when reporting on the success of a write operation.
a) Write
b) Read
c) Read only
d) SSD
View Answer

Answer: a
Explanation: The strength of the write concerns determine the level of guarantee.

7. The ________ command returns information regarding the number of open connections.
a) connPoolStats
b) connStats
c) serverstats
d) none of the mentioned
View Answer

Answer: a
Explanation: To avoid overloading the connection resources of a single mongod or mongos instance, ensure that clients maintain reasonable connection pool sizes.
advertisement

8. ________ do not typically provide sufficient performance to support a MongoDB deployment.
a) RAID-5
b) RAID-10
c) RAID-7
d) None of the mentioned
View Answer

Answer: a
Explanation: Most MongoDB deployments should use disks backed by RAID-10.

9. Which of the following should be avoided with MongoDB Deployments?
a) RAID-5
b) RAID-10
c) RAID-7
d) RAID-0
View Answer

Answer: d
Explanation: While RAID-0 provides good write performance, it also provides limited availability and can lead to reduced performance on read operations, particularly when using Amazon’s EBS volumes.

advertisement

Sanfoundry Global Education & Learning Series – MongoDB.

Here’s the list of Best Books in MongoDB.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

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.