Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
nmims post
Objective Type Set
Online MCQ Assignment
Question Solution
Solved Question
Uncategorized

MongoDB MCQ Set 1

1. The ________ References pattern stores each tree node in a document; in addition to the tree node, the document stores the id of the node’s parent.
a) Child
b) Parent
c) Root
d) None of the mentioned

View Answer

Answer: b [Reason:] Data model that describes a tree-like structure in MongoDB documents by storing references to “parent” nodes in children nodes.

2. Point out the correct statement :
a) The query to retrieve the parent of a node is fast and straightforward
b) The query to retrieve the parent of a node is slow and straightforward
c) The query to retrieve the parent of a node is slow and complex
d) All of the mentioned

View Answer

Answer: a [Reason:] You can create an index on the field to enable fast search by the parent node.

3. The ________ Links pattern provides a simple solution to tree storage but requires multiple queries to retrieve subtrees.
a) Child
b) Parent
c) Root
d) All of the mentioned

View Answer

Answer: b [Reason:] You can query by the parent field to find its immediate children nodes.

4. The _________ References pattern stores each tree node in array the id(s) of the node’s children.
a) Child
b) Parent
c) Root
d) None of the mentioned

View Answer

Answer: a [Reason:] In addition to the tree node, document stores in an array the id(s) of the node’s children.

5. Point out the wrong statement :
a) You cannot query for a node in the children field to find its parent node only
b) You can query for a node in the children field to find its parent node as well as its siblings
c) You can query for a node in the children field to find its siblings only
d) None of the mentioned

View Answer

Answer: b [Reason:] The Child References pattern provides a suitable solution to tree storage as long as no operations on subtrees are necessary.

6. Which of the following pattern may provide a suitable solution for storing graphs ?
a) Child
b) Parent
c) Root
d) None of the mentioned

View Answer

Answer: a [Reason:] Node may have multiple parents for Child Parents.

7. Which of the following pattern is more straightforward to use ?
a) Materialized Paths
b) Array of Ancestors
c) Nested Sets
d) None of the mentioned

View Answer

Answer: b [Reason:] The Array of Ancestors pattern stores each tree node in a document; in addition to the tree node, document stores in an array the id(s) of the node’s ancestors or path.

8. The Array of Ancestors pattern is slightly slower than the ________________ pattern
a) Materialized Paths
b) Array of Ancestors
c) Nested Sets
d) None of the mentioned

View Answer

Answer: a [Reason:] The Array of Ancestors pattern provides a fast and efficient solution to find the descendants and the ancestors of a node by creating an index on the elements of the ancestors field.

9. The ____________ pattern identifies each node in the tree as stops in a round-trip traversal of the tree.
a) Materialized Paths
b) Array of Ancestors
c) Nested Sets
d) None of the mentioned

View Answer

Answer: c [Reason:] The Nested Sets pattern stores each tree node in a document; in addition to the tree node, document stores the id of node’s parent, the node’s initial stop in the left field, and its return stop in the right field.

10. ____________ pattern requires additional steps of working with strings and regular expressions.
a) Materialized Paths
b) Array of Ancestors
c) Nested Sets
d) None of the mentioned

View Answer

Answer: a [Reason:] The Materialized Paths pattern stores each tree node in a document; in addition to the tree node, document stores as a string the id(s) of the node’s ancestors or path.

MongoDB MCQ Set 2

1. To get a correct snapshot of a running mongod process, you must have _________ enabled.
a) journaling
b) replication
c) MMS
d) all of the mentioned

View Answer

Answer: a [Reason:] Without journaling enabled, there is no guarantee that the snapshot will be consistent or valid.

2. Point out the correct statement :
a) Journal must reside on the same logical volume as the other MongoDB data files
b) To get a consistent snapshot of a sharded system, you must disable the balancer
c) Backups produced by copying the underlying data do not support point in time recovery
d) All of the mentioned

View Answer

Answer: d [Reason:] They are difficult to manage for larger sharded clusters.

3. The _______ tool reads data from a MongoDB database and creates high fidelity BSON files.
a) mdump
b) mongodump
c) mongod
d) all of the mentioned

View Answer

Answer: b [Reason:] mongodump is a utility for creating a binary export of the contents of a database.

4. If your storage system does not support snapshots, you can copy the files directly using :
a) cp
b) copy
c) snap
d) none of the mentioned

View Answer

Answer: a [Reason:] Since copying multiple files is not an atomic operation, you must stop all writes to the mongod before copying the files.

5. Point out the wrong statement :
a) MongoDB Cloud Manager Backup offers point in time recovery of MongoDB replica sets
b) MongoDB Cloud Manager continually backs up MongoDB replica sets
c) MMS achieves point in time recovery by storing oplog data
d) None of the mentioned

View Answer

Answer: c [Reason:] MongoDB Cloud Manager Backup also offers a consistent snapshot of sharded clusters.

6. The _________ tool can populate a MongoDB database with the data from these BSON files.
a) mongostore
b) mongorestore
c) mongod
d) none of the mentioned

View Answer

Answer: b [Reason:] This tool is not ideal for capturing backups of larger systems.

7. mongodump and mongorestore can operate against a running _______ process
a) mongostore
b) mongorestore
c) mongod
d) none of the mentioned

View Answer

Answer: c [Reason:] By default, mongodump does not capture the contents of the local database.

8. For replica sets, mongodump also supports a point in time feature with the ________ option
a) –oplog
b) –log
c) –op
d) None of the mentioned

View Answer

Answer: a [Reason:] To restore a point in time backup created with –oplog, use mongorestore with the –oplogReplay option.

9. If applications modify data while mongodump is creating a backup, _________ will compete for resources with those applications.
a) mongostore
b) mongorestore
c) mongod
d) mongodump

View Answer

Answer: d [Reason:] Applications may continue modifying data while mongodump captures the output.

10. The MongoDB ______ supports the backing up and restoring of MongoDB deployments.
a) Cloud Manager
b) MMS
c) MonitorMMS
d) None of the mentioned

View Answer

Answer: a [Reason:] MongoDB Cloud Manager continually backs up MongoDB replica sets and sharded clusters by reading the oplog data from your MongoDB deployment.

MongoDB MCQ Set 3

1. The __________ JavaScript shell and the MongoDB language drivers translate between BSON and the language-specific document representation.
a) mongod
b) mongo
c) iscript
d) none of the mentioned

View Answer

Answer: b [Reason:] The value of a field can be any of the BSON data types.

2. Point out the correct statement :
a) MongoDB stores chunks on disk in the XML serialization format
b) MongoDB stores documents on disk in the BSON serialization format
c) MongoDB stores documents on RAM in the JSON serialization format
d) All of the mentioned

View Answer

Answer: a [Reason:] BSON documents may have more than one field with the same name.

3. BSON is a binary representation of ________ documents,
a) JSON
b) XML
c) JScript
d) All of the mentioned

View Answer

Answer: a [Reason:] BSON contains more data types than JSON.

4. MongoDB documents are composed of field-and-value pairs and have the following structure:
a) field1:; value1
b) field1: value1;
c) field1: value1
d) none of the mentioned

View Answer

Answer: c [Reason:] The value of a field can be any of the BSON data types, including other documents, arrays, and arrays of documents.

5. Point out the wrong statement :
a) Some documents created by internal MongoDB processes may have duplicate fields
b) no MongoDB process will ever add duplicate fields to an existing user document
c) The maximum BSON document size is 16 megabytes
d) None of the mentioned

View Answer

Answer: c [Reason:] The maximum document size helps ensure that a single document cannot use excessive amount of RAM or, during transmission, excessive amount of bandwidth.

6. To store documents larger than the maximum size, MongoDB provides the _______ API.
a) Grid
b) MMS
c) GridFS
d) None of the mentioned

View Answer

Answer: c [Reason:] MongoDB preserves the order of the document fields following write operations.

7. The ______ field is always the first field in the document.
a) _id
b) id
c) Ob_id
d) None of the mentioned

View Answer

Answer: a [Reason:] Updates that include renaming of field names may result in the reordering of fields in the document.

8. To ensure functioning replication, do not store values that are of the _______ regular expression type in the _id field.
a) JSON
b) XML
c) JScript
d) None of the mentioned

View Answer

Answer: d [Reason:] The _id field may contain values of any BSON data type, other than an array.

9. Index keys that are of the _______ type are more efficiently stored in the index.
a) Materialized Paths
b) BinData
c) String
d) None of the mentioned

View Answer

Answer: b [Reason:] Most MongoDB driver clients will include the _id field and generate an ObjectId before sending the insert operation to MongoDB.

10. MongoDB uses the ________ notation to access the elements of an array and to access the fields of an embedded document.
a) Dot
b) Array
c) Nested Sets
d) None of the mentioned

View Answer

Answer: a [Reason:] To access an element of an array by the zero-based index position, concatenate the array name with the dot (.) and zero-based index position, and enclose in quotes.

MongoDB MCQ Set 4

1. Which of the following is a metapackage for enterprise ?
a) mongodb-enterprise
b) mongodb-enterprise-server
c) mongodb-enterprise-mongos
d) none of the mentioned

View Answer

Answer: a [Reason:] mongodb-enterprise is a metapackage that will automatically install the four component packages.

2. Point out the correct statement :
a) MongoDB provides packages of the officially supported MongoDB Enterprise builds in it’s own repository
b) mongodb-enterprise-tool package contains the mongo shell
c) mongodb-enterprise-shell package contains the mongo tools
d) All of the mentioned

View Answer

Answer: a [Reason:] This repository provides the MongoDB Enterprise distribution in many packages.

3. ______ package contains the mongod daemon and associated configuration and init scripts.
a) mongodb-enterprise
b) mongodb-enterprise-server
c) mongodb-enterprise-mongos
d) none of the mentioned

View Answer

Answer: b [Reason:] mongodb-enterprise-mongos package contains the mongos daemon.

4. Which of the following is not a part of mongodb-enterprise-tools ?
a) mongodump
b) mongotop
c) mongodown
d) none of the mentioned

View Answer

Answer: c [Reason:] mongodb-enterprise-tools package contains the following MongoDB tools: mongoimport bsondump, mongodump, mongoexport, mongofiles, mongoimport, mongooplog, mongoperf, mongorestore, mongostat, and mongotop.

5. Point out the wrong statement :
a) As of version 2.0.0, there are no control scripts for mongos
b) The mongodb-enterprise package includes various control scripts, including the init script /etc/rc.d/init.d/mongod
c) You must configure SELinux to allow MongoDB to start on Red Hat Linux-based systems
d) None of the mentioned

View Answer

Answer: a [Reason:] As of version 3.0.0, there are no control scripts for mongos.The mongos process is used only in sharding.

6. MongoDB only provides Enterprise packages for Ubuntu ________ LTS
a) 13.04
b) 12.10
c) 12.04
d) 13.10

View Answer

Answer: c [Reason:] The package structure and names have changed as of version 2.6.

7. Which of the following is Ubuntu package management tool ?
a) wapt
b) dpkg
c) capt
d) wat

View Answer

Answer: b [Reason:] The Ubuntu package management tools (i.e. dpkg and apt) ensure package consistency and authenticity by requiring that distributors sign packages with GPG keys.

8. Command to install the latest stable version of MongoDB Enterprise in Ubuntu is :
a) sudo apt-get install mongodb
b) sudo apt-get install mongodb-enterprise
c) sudo apt-get install mongodb-ent
d) all of the mentioned

View Answer

Answer: b [Reason:] To install a specific release of MongoDB Enterprise, specify each component package individually and append the version number to the package name.

9. mongod process is stopped by issuing the following command:
a) sudo service mongod start
b) sudo service mongod stop
c) sudo service mongod restart
d) none of the mentioned

View Answer

Answer: b [Reason:] To stop MongoDB, press Control+C in the terminal where the mongod instance is running.

10. ____________ package contains the mongo shell.
a) mongodb-enterprise
b) mongodb-enterprise-server
c) mongodb-enterprise-shell
d) none of the mentioned

View Answer

Answer: C [Reason:] mongodb-enterprise-mongos package contains the mongos daemon.

MongoDB MCQ Set 5

1. To install the latest stable version of MongoDB on SUSE , issue :
a) sudo zypper install mongodb-enterprise
b) sudo zypper update mongodb-enterprise
c) sudo zyp install mongodb-enterprise
d) none of the mentioned

View Answer

Answer: a [Reason:] When you install the packages, you choose whether to install the current release or a previous one. This step provides the commands for both.

2. Point out the correct statement :
a) MongoDB can be installed on SUSE which is a Linux flavour
b) MongoDB Enterprise is available on select platforms and contains support for several features related to security and monitoring
c) A commercial edition of MongoDB that includes additional features
d) All of the mentioned

View Answer

Answer: d [Reason:] MongoDB is a server process that runs on Linux, Windows and OS X.

3. The MongoDB instance stores its _________ files in /var/lib/mongo by default
a) log
b) data
c) replica
d) all of the mentioned

View Answer

Answer: b [Reason:] You can specify alternate log and data file directories in /etc/mongod.conf.

4. The MongoDB process listens on port _________ by default
a) 27017
b) 27170
c) 27107
d) 26017

View Answer

Answer: a [Reason:] Clients connect to the MongoDB process, optionally authenticate themselves if security is turned on, and perform a sequence of actions, such as inserts, queries and updates.

5. Point out the wrong statement :
a) If you change the user that runs the MongoDB process, you must modify the access control rights
b) The MongoDB instance stores its data files in /var/log/mongodb by default
c) MongoDB uses memory mapped files for data management for efficiency
d) None of the mentioned

View Answer

Answer: b [Reason:] The MongoDB instance stores its data files in /var/lib/mongo and its log files in /var/log/mongodb by default.

6. Which of the following file is not a MongoDB configuration file ?
a) mongodb.conf
b) mongod.conf
c) mongodb.con
d) none of the mentioned

View Answer

Answer: b [Reason:] The Enterprise packages include an example SNMP configuration file named mongod.conf.

7. User account running mongod has _______ permissions for the directory.
a) write only
b) read only
c) read and write
d) none of the mentioned

View Answer

Answer: c [Reason:] To run MongoDB, run the mongod process at the system prompt.

8. ___________ allows you to scale your cluster linearly by adding more machines.
a) Vertical sharding
b) Autosharding
c) Horizontal sharding
d) All of the mentioned

View Answer

Answer: b [Reason:] It is possible to increase capacity without any downtime, which is very important on the web when load can increase suddenly and bringing down the website for extended maintenance can cost your business large amounts of revenue.

9. MongoDB is installed unattended on Windows from the command line using :
a) msi.exe
b) msiexec.exe
c) exec.exe
d) none of the mentioned

View Answer

Answer: b [Reason:] MongoDB requires a data directory to store all data. MongoDB’s default data directory path is datadb.

10. Sometimes mongod.exe is visible on public networks without running in _________ Mode with the auth setting.
a) Permanent
b) Secure
c) Primary
d) Protected

View Answer

Answer: b [Reason:] MongoDB is designed to be run in trusted environments, and the database does not enable “Secure Mode” by default.