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
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
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
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.
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
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
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
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
Explanation: To avoid overloading the connection resources of a single mongod or mongos instance, ensure that clients maintain reasonable connection pool sizes.
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
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
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.
Sanfoundry Global Education & Learning Series – MongoDB.
Here’s the list of Best Books in MongoDB.
- Check Information Technology Books
- Practice Programming MCQs
- Check MongoDB Books
- Apply for Programming Internship