MongoDB Questions and Answers – MongoDB Packages

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

1. ____________ does not dump the content of the local database.
a) mongoshell
b) mongodump
c) mongolocaldump
d) none of the mentioned
View Answer

Answer: b
Explanation: mongodump can read data from either mongod or mongos instances, in addition to reading directly from MongoDB data files without an active mongod.

2. Point out the correct statement.
a) The data format used by mongodump from version 2.2 or later is incompatible with earlier versions of mongod
b) The replica role confers no additional access, in keeping with the policy of least privilege
c) To backup a given database’s users, you must have the replace action on the admin database’s admin.system.users collection
d) All of the mentioned
View Answer

Answer: a
Explanation: Do not use recent versions of mongodump to back up older data stores.

3. To backup all the databases in a cluster via mongodump, you should have the ___________ role.
a) restore
b) backup
c) replication
d) all of the mentioned
View Answer

Answer: b
Explanation: The backup role provides the required privileges for backing up all databases.

4. ___________ is a routing service for MongoDB shard configurations that processes queries from the application layer.
a) mongod
b) mongos
c) mongocon
d) none of the mentioned
View Answer

Answer: b
Explanation: From the perspective of the application, a mongos instance behaves identically to any other MongoDB instance.

advertisement
advertisement

5. Point out the wrong statement.
a) To backup a given database, you must have read access on the database
b) The backup role confers no additional access, in keeping with the policy of least privilege
c) mongodumplocal overwrites output files if they exist in the backup data folder
d) All of the mentioned
View Answer

Answer: c
Explanation: To backup the system.profile collection, which is created when you activate database profiling, you must have additional read access on this collection.

6. __________ sends all diagnostic logging information to a log file instead of to standard output or to the host’s syslog system.
a) syspath
b) syslog
c) logpath
d) syspathlog
View Answer

Answer: c
Explanation: By default, MongoDB overwrites the log file when the process restarts.

Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

7. ___________ is the primary daemon process for the MongoDB system.
a) mongos
b) mongod
c) logpath
d) syspathlog
View Answer

Answer: b
Explanation: It handles data requests, manages data access, and performs background management operations.

8. __________ is a diagnostic tool for inspecting BSON files.
a) jsondump
b) bsondump
c) bsondumpjson
d) all of the mentioned
View Answer

Answer: b
Explanation: The bsondump converts BSON files into human-readable formats, including JSON.

advertisement

9. Which of the following is a utility to check disk I/O performance independently of MongoDB?
a) mongoperf
b) mongoio
c) mongod
d) none of the mentioned
View Answer

Answer: a
Explanation: Specify options to mongoperf using a JavaScript document.

10. ____________ utility makes it possible to manipulate files stored in your MongoDB instance in GridFS objects from the command line.
a) mongoperf
b) mongoio
c) mongod
d) mongofiles
View Answer

Answer: d
Explanation: All mongofiles commands have the following form:mongofiles <options> <commands> <filename>.

advertisement

Sanfoundry Global Education & Learning Series – MongoDB.

Here’s the list of Best Books in MongoDB.

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.