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
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
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
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
Explanation: From the perspective of the application, a mongos instance behaves identically to any other MongoDB instance.
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
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
Explanation: By default, MongoDB overwrites the log file when the process restarts.
7. ___________ is the primary daemon process for the MongoDB system.
a) mongos
b) mongod
c) logpath
d) syspathlog
View Answer
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
Explanation: The bsondump converts BSON files into human-readable formats, including JSON.
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
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
Explanation: All mongofiles commands have the following form:mongofiles <options> <commands> <filename>.
Sanfoundry Global Education & Learning Series – MongoDB.
Here’s the list of Best Books in MongoDB.
- Apply for Programming Internship
- Check Information Technology Books
- Practice Programming MCQs
- Check MongoDB Books