R4RIN
Articles
Java 8
MCQS
MongoDB MCQ Quiz Hub
MongoDB Mcq Question Set 8
Choose a topic to test your knowledge and improve your MongoDB skills
1. MongoDB’s _______ is a database profiling system that can help identify inefficient queries and operations.
Reporter
Executer
Profiler
none of the mentioned
2. With the _______ storage engine, MongoDB uses memory-mapped files to store data.
MMAPv2
MMAPv1
WiredTiger
All of the Mentioned
3. Point out the correct statement.
Spikes in the number of available connections can also be the result of application or driver errors
For read-heavy applications, increase the size of your replica set and distribute read operations to secondary members
For read-heavy applications, deploy sharding and add one or more shards to a sharded cluster to distribute load among mongod instances
All of the Mentioned
4. The memory usage statuses metrics of the _________ output can provide insight into MongoDB’s memory use.
globalstats
serverStatus
locks.deadlockCount
All of the mentioned
5. Point out the wrong statement.
A single page fault completes slowly and is problematic
Increasing the amount of RAM accessible to MongoDB may help reduce the frequency of page faults
Page faults also can occur while accessing large data sets or scanning an entire collection
None of the mentioned
6. You can inspect __________ to check the amount of mapped memory that mongod is using.
mem.mapped
memory.resident
mem.resident
All of the mentioned
7. MongoDB reports its triggered page faults as the total number of page faults in ________ second.
1
100
1000
none of the mentioned
8. Which of the operator is used to access the query field of documents within system.profile?
$select
$retrieve
$query
None of the mentioned
9. ____ returns information on the query plan for aggregate function.
Reporter
db.collection.explain()
db.collection.explainplan()
None of the mentioned
10. By default, db.collection.explain() runs in ___________ verbosity mode.
VerbosityMode
queryPlanner
executeStats
none of the mentioned
11. ____ does not provide query execution information for the rejected plans.
serverstats
queryPlanner
executionStats
All of the Mentioned
12. Which of the following provides information on the MongoDB instance?
serverInfo
queryPlanner
executeStats
None of the mentioned
13. _____ corresponds to the millis field returned by cursor.explain() in earlier versions of MongoDB.
executionMillis
executionTimeMillis
timemillis
All of the Mentioned
14. For sharded collections, explain returns the __________ for each accessed shard.
clientInfo
serverInfo
serverplan
All of the Mentioned
15. Point out the wrong statement.
If MongoDB can use an index scan to obtain the requested sort order, the result will not include a SORT stage
In previous versions of MongoDB, cursor.explain() returned the scanAndOrder field to specify whether MongoDB could use the index order to return sorted results
If MongoDB uses indexes for a $and expression, the result will include the AND stage with an inputStages array that details the replicata sets
none of the mentioned
16. If the query planner selects a collection scan, the explain result includes a _________ stage.
COLLSCAN
TABLESCAN
ROWSCAN
All of the Mentioned
17. Which of the following parameter specifies the verbosity mode for the explain output?
verbosity
verbose
queryPlanner
None of the mentioned
18. In _____________ mode, MongoDB returns statistics describing the execution of the winning plan as well as statistics for the other candidate plans captured during plan selection.
somePlansExecution
allPlansExecution
rejPlansExecution
None of the mentioned
19. If the query planner selects a _________ the explain result includes an IXSCAN stage.
Index
Replica Set
Document
None of the mentioned
20. MongoDB stores additional instance-local metadata in the _______ database.
Master
Model
Local
All of the Mentioned
21. Point out the correct statement.
You can limit the number of incoming connections using the maxConnections run-time option
mongos instances maintain a connection pool to each shard so that the mongos can reuse connections
You can use the limit command at the system prompt to check system limits
All of the Mentioned
22. In replica sets, each ________ maintains a connection to all other members of the set.
serverInfo
mongod
mongos
None of the mentioned
23. The ___________ collection stores the user’s authentication credentials as well as any roles assigned to the user.
admin.system.auth
admin.system.users
admin.system.usersauth
All of the mentioned
24. Point out the wrong statement.
The “hard” ulimit refers to the maximum number of processes that a user can have active at any time
The “soft” ulimit refers to the minimum number of processes that a user can have active at any time
ulimit will modify both “hard” and “soft” values unless the -H or -S modifiers are specified when modifying limit values
none of the mentioned
25. The <database>.system.indexes collection lists all the _________ in the database.
serverinfo
indexes
profiling
All of the Mentioned
26. Which of the following The collection holds special JavaScript code for use in server side JavaScript?
&lt;database&gt;.system.jserver
&lt;database&gt;.system.jscript
&lt;database&gt;.system.js
None of the mentioned
27. Which of the following can store JavaScript functions for reuse?
store.js
system.js
system.store.js
save.js
28. ___ is used to load all the scripts saved in the system.js collection for the current database.
db.loadServerScripts()
db.loadScripts()
db.loadServerScriptsjs()
None of the mentioned
29. Which of the following information is captured by database profiler?
Read operations
Write operations
Cursor Operations
All of the Mentioned
30. Point out the correct statement.
A limit() value of 0 (i.e. .limit(0)) is equivalent to setting no limit
The behavior of limit() is undefined for values less than -231 and greater than 231
You can use the ulimit command at the system prompt to check system limits
All of the Mentioned
31. Which of the following collection is capped?
system.index
system.replica
system.profile
All of the Mentioned
32. The ___________ provides information for various lock types and lock modes held during the operation.
admin.system.authlocks
system.profile.locks
admin.system.locks
All of the Mentioned
33. Point out the wrong statement.
Beginning with version 3.0, MongoDB ships with the WiredTiger storage engine
Some global operations, typically short lived operations involving multiple databases, still require a global “instance-wide” lock
The MMAPv1 storage engine uses collection-level locking
None of the mentioned
34. Which of the following keyword represents lock on the collection?
Database
Collection
Metadata
All of the Mentioned
35. How many types of locking modes exist in MongoDB?
1
2
3
More than 3
36. Which of the following represents number of times the operation acquired the lock in the specified mode?
system.profile.locks.acquireCount
system.profile.locks.acquireWaitCount
system.profile.locks.Count
None of the mentioned
37. ____ can be used to limit the size of the result document for a query operation.
limit()
aggregate()
skip()
None of the mentioned
38. Which of the following code is used for the successful exit of task?
0
1
2
3
39. Point out the correct statement.
2 is returned by mongod if there is a mismatch between hostnames specified on the command line and in the local.sources collection
When an index covers a query, MongoDB can both match the query conditions and return the results using only the index keys
Both 2 and 4 are returned by mongod if there is a mismatch between hostnames specified on the command line and in the local.sources collection
All of the Mentioned
40. Instance exits cleanly are represented by ___ exit code.
4
1
2
3
41. Which of the following code is returned by mongod if a moveChunk operation fails to confirm a commit?
5
6
7
3
42. Point out the correct statement.
Exit code 10 is for abnormal exit
4 is returned when the version of the database is different from the version supported by the mongod (or mongod.exe) instance
The server socket is on port 27017 by default
None of the mentioned
43. Which of the following code represents exit cleanly following a large clock skew (32768 milliseconds) event?
45
20
47
100
44. 49 code is returned by mongod from _________ Service control Manager.
Linux
Windows
Ubuntu
All of the Mentioned
45. Which of the following code is returned when a MongoDB application cannot open a file?
45
20
47
100
46. Identify the message returned by MongoDB applications for Windows due to failures installing?
Message: ERROR: wsastartup failed &lt;reason&gt;
Message: NT Service Error
Message: wsastartup failed &lt;reason&gt;
none of the mentioned
47. Which of the following document represents uncaught exception?
45
49
47
100
48. Which of the following method is used for managing user?
db.createUser()
db.User()
db.superuser()
None of the mentioned
49. Point out the correct statement.
Authentication is the process of verifying the identity of a client
When access control is enabled, MongoDB requires all clients to authenticate themselves first in order to determine the access for the client
Authentication and authorization are closely connected
All of the Mentioned
50. MongoDB stores user information in the _________ collection.
system.allusers
system.users
system.superusers
system.usersnone
Submit