Olete.in
Articles
Mock Tests
đŸ§ª MongoDB MCQ Quiz Hub
MongoDB Mcq Question Set 2
Choose a topic to test your knowledge and improve your MongoDB skills
1. Which of the following is not a part of mongodb-enterprise-tools?
mongodump
mongotop
mongodown
none of the mentioned
2. Point out the wrong statement.
As of version 2.0.0, there are no control scripts for mongos
The mongodb-enterprise package includes various control scripts, including the init script /etc/rc.d/init.d/mongod
You must configure SELinux to allow MongoDB to start on Red Hat Linux-based systems
None of the mentioned
3. MongoDB only provides Enterprise packages for Ubuntu ________ LTS.
13.04
12.10
12.04
13.10
4. Which of the following is the Ubuntu package management tool?
wapt
dpkg
capt
wat
5. Command to install the latest stable version of MongoDB Enterprise in Ubuntu is _____
sudo apt-get install mongodb
sudo apt-get install mongodb-enterprise
sudo apt-get install mongodb-ent
All of the Mentioned
6. mongod process is stopped by issuing which of the following command?
sudo service mongod start
sudo service mongod stop
sudo service mongod restart
None of the mentioned
7. _______ package contains the mongo shell.
mongodb-enterprise
mongodb-enterprise-server
mongodb-enterprise-shell
None of the mentioned
8. To install the latest stable version of MongoDB on SUSE, issue ______
sudo zypper install mongodb-enterprise
sudo zypper install mongodb-enterprise
sudo zyp install mongodb-enterprise
None of the mentioned
9. Point out the correct statement.
MongoDB can be installed on SUSE which is a Linux flavour
MongoDB Enterprise is available on select platforms and contains support for several features related to security and monitoring
A commercial edition of MongoDB that includes additional features
All of the Mentioned
10. The MongoDB instance stores its _________ files in /var/lib/mongo by default.
log
data
replica
All of the mentioned
11. The MongoDB process listens on port _________ by default.
27017
27170
27107
26017
12. Point out the wrong statement.
If you change the user that runs the MongoDB process, you must modify the access control rights
The MongoDB instance stores its data files in /var/log/mongodb by default
MongoDB uses memory mapped files for data management for efficiency
None of the mentioned
13. Which of the following file is a MongoDB configuration file?
mongodb.conf
mongod.conf
mongodb.con
None of the mentioned
14. User account running mongod has _______ permissions for the directory.
write only
read only
read and write
None of the mentioned
15. _____ allows you to scale your cluster linearly by adding more machines.
Vertical sharding
Autosharding
Horizontal sharding
All of the Mentioned
16. MongoDB is installed unattended on Windows from the command line using ____
msi.exe
msiexec.exe
exec.exe
None of the mentioned
17. Sometimes mongod.exe is visible on public networks without running in _________ Mode with the auth setting.
Permanent
Secure
Primary
Protected
18. _____ does not dump the content of the local database.
mongoshell
mongodump
mongolocaldump
None of the mentioned
19. Point out the correct statement.
The data format used by mongodump from version 2.2 or later is incompatible with earlier versions of mongod
The replica role confers no additional access, in keeping with the policy of least privilege
To backup a given database’s users, you must have the replace action on the admin database’s admin.system.users collection
All of the Mentioned
20. To backup all the databases in a cluster via mongodump, you should have the ___________ role.
restore
backup
replication
All of the mentioned
21. _____ is a routing service for MongoDB shard configurations that processes queries from the application layer.
mongod
mongos
mongocon
none of the mentioned
22. Point out the wrong statement.
To backup a given database, you must have read access on the database
The backup role confers no additional access, in keeping with the policy of least privilege
mongodumplocal overwrites output files if they exist in the backup data folder
All of the Mentioned
23. ______ sends all diagnostic logging information to a log file instead of to standard output or to the host’s syslog system.
syspath
syslog
logpath
syspathlog
24. _____ is the primary daemon process for the MongoDB system.
mongos
mongod
logpath
syspathlog
25. _____ is a diagnostic tool for inspecting BSON files.
jsondump
bsondump
bsondumpjson
All of the Mentioned
26. Which of the following is a utility to check disk I/O performance independently of MongoDB?
mongoperf
mongoio
mongod
None of the mentioned
27. ______ utility makes it possible to manipulate files stored in your MongoDB instance in GridFS objects from the command line.
mongoperf
mongoio
mongod
mongofiles
28. ______ is a part of the standard MongoDB distribution and provides a full JavaScript environment.
mongod
mongodb
mongo
None of the mentioned
29. Point out the correct statement.
MMS provides backup and monitoring
MongoDB can also be configured for data replication
MMS is available to all users in the cloud and on-premises as part of MongoDB Standard and Enterprise Subscriptions
All of the Mentioned
30. mongo looks for a database server listening on port 27017 on the ________ interface.
web
localhost
web host
All of the Mentioned
31. After starting the mongo shell, your session will use the ________ database by default.
mongo
master
test
primary
32. Point out the wrong statement.
MongoDB works right out of the box, and you can dive right into developing your application, instead of spending a lot of time fine-tuning obscure database configurations
MongoDB works hard to be very easy to install, configure, maintain, and use
MongoDB does not provide a lot of the features of a traditional RDBMS
None of the mentioned
33. _______ command display the list of databases.
show db
show dbs
show data
display dbs
34. Which of the following operation is used to switch to new database mydb?
use dbs
use db
use mydb
use mydbs
35. Which of the following also returns a list of databases?
show databases
show database
display dbs
All of the mentioned
36. Command to check existence of collection is ______
show collection
show collections
show collect
None of the mentioned
37. Which of the following method is used to query documents in collections?
find
move
shell
replace()
38. When you query a collection, MongoDB returns a ________ object that contains the results of the query.
row
cursor
colums
None of the mentioned
39. Point out the correct statement.
A database is a set of key-value pairs
A MongoDB deployment hosts a number of databases
A document holds a set of collections
All of the Mentioned
40. Which of the following method returns true if the cursor has documents?
hasMethod()
hasNext()
hasDoc()
All of the Mentioned
41. _____ method renders the document in a JSON-like format.
displayjson
print
printjson
printdoc
42. Point out the wrong statement.
Documents have static schema in MongoDB
Eventually-consistent reads can be distributed over replicated servers
Indexes can include keys from embedded documents and arrays
None of the mentioned
43. Which of the following method is called while accessing documents using the array index notation?
cur.toArray()
cursor.toArray()
doc.toArray()
All of the Mentioned
44. The mongo shell and the drivers provide several cursor methods that call on the cursor returned by the _______ method to modify its behavior.
cursor()
find()
findc()
none of the mentioned
45. Which of the following method corresponds to Order by clause in SQL?
sort()
order()
orderby()
All of the Mentioned
46. The __________ method limits the number of documents in the result set.
limit()
limitOf()
limitBy()
None of the mentioned
47. Which of the following line skips the first 5 documents in the bios collection and returns all remaining documents?
db.bios.find().limit( 5 )
db.bios.find().skip( 1 )
db.bios.find().skip( 5 )
db.bios.find().sort( 5 )
48. Which of the following will implicitly create the collection testData?
while (var i = 1; i <= 25; i++) { db.testData.insert( { x : i } ) }
for (var i = 1; i <= 25; i++) { db.testData.insert( { x : i } ) }
for (var i = 1; i <= 25; i++) { db.testData.inserts( { x : i } ) }
None of the mentioned
49. Point out the correct statement.
Collection is a group of MongoDB documents
MongoDB is an open-source document database, and leading NoSQL database
Collections do not enforce a schema
All of the mentioned
50. Which of the following method returns a cursor?
find
sort
skip
All of the Mentioned
Submit