This set of MongoDB Multiple Choice Questions & Answers (MCQs) focuses on “System Collections”.
1. MongoDB stores additional instance-local metadata in the _______ database.
a) Master
b) Model
c) Local
d) All of the mentioned
View Answer
Explanation: It is stored specifically for replication purposes.
2. Point out the correct statement.
a) You can limit the number of incoming connections using the maxConnections run-time option
b) mongos instances maintain a connection pool to each shard so that the mongos can reuse connections
c) You can use the limit command at the system prompt to check system limits
d) All of the mentioned
View Answer
Explanation: This would quickly fulfill requests without needing to create new connections.
3. In replica sets, each ________ maintains a connection to all other members of the set.
a) serverInfo
b) mongod
c) mongos
d) none of the mentioned
View Answer
Explanation: mongod uses background threads for a number of internal processes, including TTL collections, replication, and replica set health checks, which may require a small number of additional resources.
4. The ___________ collection stores the user’s authentication credentials as well as any roles assigned to the user.
a) admin.system.auth
b) admin.system.users
c) admin.system.usersauth
d) all of the mentioned
View Answer
Explanation: Users may define authorization roles in the admin.system.roles collection.
5. Point out the wrong statement.
a) The “hard” ulimit refers to the maximum number of processes that a user can have active at any time
b) The “soft” ulimit refers to the minimum number of processes that a user can have active at any time
c) ulimit will modify both “hard” and “soft” values unless the -H or -S modifiers are specified when modifying limit values
d) None of the mentioned
View Answer
Explanation: There are both “hard” and the “soft” ulimits that affect MongoDB’s performance.
6. The <database>.system.indexes collection lists all the _________ in the database.
a) serverinfo
b) indexes
c) profiling
d) all of the mentioned
View Answer
Explanation: The <database>.system.profile collection stores database profiling information. For information on profiling.
7. Which of the following The collection holds special JavaScript code for use in server side JavaScript?
a) <database>.system.jserver
b) <database>.system.jscript
c) <database>.system.js
d) none of the mentioned
View Answer
Explanation: Do not store application logic in the database.
8. Which of the following can store JavaScript functions for reuse?
a) store.js
b) system.js
c) system.store.js
d) save.js
View Answer
Explanation: To store a function, you can use the db.collection.save().
9. ______ is used to load all the scripts saved in the system.js collection for the current database.
a) db.loadServerScripts()
b) db.loadScripts()
c) db.loadServerScriptsjs()
d) none of the mentioned
View Answer
Explanation: The documents in the system.js collection provide functions that your applications can use in any JavaScript context with MongoDB in this database.
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