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. ____________ does not provide query execution information for the rejected plans.
a) serverstats
b) queryPlanner
c) executionStats
d) all of the mentioned

View Answer

Answer: c [Reason:] executionStats contains statistics that describe the completed query execution for the winning plan.

2. Point out the correct statement :
a) In MongoDB 3.0, cursor.explain() returns the indexOnly field to indicate whether the index covered a query
b) When an index covers a query, MongoDB can both match the query conditions and return the results using only the index keys
c) For read-heavy applications, deploy sharding and add one or more shards to a sharded cluster to distribute load among mongod instances
d) All of the mentioned

View Answer

Answer: b [Reason:] MongoDB does not need to examine documents from the collection to return the results.

3. _________ corresponds to the millis field returned by cursor.explain() in earlier versions of MongoDB.
a) executionMillis
b) executionTimeMillis
c) timemillis
d) all of the mentioned

View Answer

Answer: b [Reason:] explain.executionStats.executionTimeMillis is total time in milliseconds required for query plan selection and query execution.

4. For sharded collections, explain returns the __________ for each accessed shard.
a) clientInfo
b) serverInfo
c) serverplan
d) all of the mentioned

View Answer

Answer: b [Reason:] For sharded collections, explain returns the core query planner and server information for each accessed shard in the shards field

5. Point out the wrong statement :
a) If MongoDB can use an index scan to obtain the requested sort order, the result will not include a SORT stage
b) In previous versions of MongoDB, cursor.explain() returned the scanAndOrder field to specify whether MongoDB could use the index order to return sorted results
c) If MongoDB uses indexes for an $and expression, the result will include the AND stage with an inputStages array that details the replicata sets
d) None of the mentioned

View Answer

Answer: a [Reason:] If MongoDB uses indexes for an $or expression, the result will include the OR stage with an inputStages array that details the indexes

6. If the query planner selects a collection scan, the explain result includes a _________ stage.
a) COLLSCAN
b) TABLESCAN
c) ROWSCAN
d) All of the mentioned

View Answer

Answer: a [Reason:] The format and fields of the explain results have changed from previous versions.

7. Which of the following parameter specifies the verbosity mode for the explain output ?
a) verbosity
b) verbose
c) queryPlanner
d) none of the mentioned

View Answer

Answer: b [Reason:] The mode affects the behavior of explain() and determines the amount of information to return.

8. 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.
a) somePlansExecution
b) allPlansExecution
c) rejPlansExecution
d) none of the mentioned

View Answer

Answer: b [Reason:] cursor.explain() returns the queryPlanner and executionStats information for the evaluated method.

9. If the query planner selects an _________, the explain result includes a IXSCAN stage.
a) Index
b) Replica Set
c) Document
d) None of the mentioned

View Answer

Answer: a [Reason:] MongoDB runs the query optimizer to choose the winning plan for the operation under evaluation.

10. _________ which provides information on the MongoDB instance.
a) serverInfo
b) queryPlanner
c) executeStats
d) none of the mentioned

View Answer

Answer: a [Reason:] The verbosity mode (i.e. queryPlanner, executionStats, allPlansExecution) determines whether the results include executionStats and whether executionStats includes data captured during plan selection.

MongoDB MCQ Set 2

1. With the _______ storage engine, MongoDB uses memory-mapped files to store data.
a) MMAPv2
b) MMAPv1
c) WiredTiger
d) All of the mentioned

View Answer

Answer: b [Reason:] Given a data set of sufficient size, the mongod process will allocate all available memory on the system for its use.

2. Point out the correct statement :
a) Spikes in the number of available connections can also be the result of application or driver errors
b) For read-heavy applications, increase the size of your replica set and distribute read operations to secondary members
c) For read-heavy applications, deploy sharding and add one or more shards to a sharded cluster to distribute load among mongod instances
d) All of the mentioned

View Answer

Answer: b [Reason:] Extremely high numbers of connections, particularly without corresponding workload is often indicative of a driver or other configuration error.

3. The memory usage statuses metrics of the _________ output can provide insight into MongoDB’s memory use.
a) globalstats
b) serverStatus
c) locks.deadlockCount
d) all of the mentioned

View Answer

Answer: b [Reason:] The serverStatus command returns a document that provides an overview of the database process’s state.

4. The _________ field provides the amount of resident memory in use.
a) mem.resident
b) memory.resident
c) mem.resident
d) all of the mentioned

View Answer

Answer: c [Reason:] If this exceeds the amount of system memory and there is a significant amount of data on disk that isn’t in RAM, you may have exceeded the capacity of your system.

5. Point out the wrong statement :
a) A single page fault completes slowly and is problematic
b) Increasing the amount of RAM accessible to MongoDB may help reduce the frequency of page faults
c) Page faults also can occur while accessing large data sets or scanning an entire collection
d) None of the mentioned

View Answer

Answer: a [Reason:] However, in aggregate, large volumes of page faults typically indicate that MongoDB is reading too much data from disk.

6. You can inspect __________ to check the amount of mapped memory that mongod is using.
a) mem.mapped
b) memory.resident
c) mem.resident
d) all of the mentioned

View Answer

Answer: a [Reason:] If this value is greater than the amount of system memory, some operations will require a page faults to read data from disk.

7. MongoDB reports its triggered page faults as the total number of page faults in ________ second.
a) 1
b) 100
c) 1000
d) None of the mentioned

View Answer

Answer: a [Reason:] Rapid increases in the MongoDB page fault counter may indicate that the server has too little physical memory.

8. Which of the operator is used to access the query field of documents within system.profile ?
a) $select
b) $retrieve
c) $query
d) None of the mentioned

View Answer

Answer: c [Reason:] You can view the output of the profiler in the system.profile collection of your database by issuing the show profile command.

9. ____________ returns information on the query plan for aggregate function.
a) Reporter
b) db.collection.explain()
c) db.collection.explainplan()
d) None of the mentioned

View Answer

Answer: b [Reason:] MongoDB runs the query optimizer to choose the winning plan for the operation under evaluation.

10. By default, db.collection.explain() runs in ___________ verbosity mode.
a) VerbosityMode
b) queryPlanner
c) executeStats
d) none of the mentioned

View Answer

Answer: b [Reason:] db.collection.explain() returns the queryPlanner information for the evaluated method.

MongoDB MCQ Set 3

1. _______ enables the balancer and waits for balancing to start.
a) sh.waitForBalancer()
b) sh.startBalancer()
c) sh.waitForDLock()
d) all of the mentioned

View Answer

Answer: b [Reason:] sh.waitForDLock() waits for a specified distributed sharded cluster lock.

2. Point out the correct statement:
a) sh.deadForDLock() waits for a specified distributed sharded cluster lock
b) sh.waitForBalancerOff() waits until the balancer stops running
c) sh.statusserver() reports on the status of a sharded cluster, as db.printShardingStatus()
d) all of the mentioned

View Answer

Answer: a [Reason:] sh.stopBalancer() disables the balancer and waits for any in progress balancing rounds to complete.

3. _________ waits for a change in ping state from one of the mongos in the sharded cluster.
a) sh.waitForBalancer()
b) sh.startBalancer()
c) sh.waitForPingChange()
d) all of the mentioned

View Answer

Answer: c [Reason:] sh.waitForBalancer() waits for the balancer state to change.

4. _______ forces an update to the cluster metadata cached by a mongos.
a) config
b) flushconf
c) flushRouterConfig
d) all of the mentioned

View Answer

Answer: c [Reason:] flushRouterConfig clears the current cluster information cached by a mongos instance and reloads all sharded cluster metadata from the config database.

5. Point out the wrong statement :
a) moveChunks provides the ability to combine chunks on a single shard
b) setShardVersion is used to set the config server version
c) shardCollection enables the sharding functionality for a collection, allowing the collection to be sharded
d) none of the mentioned

View Answer

Answer: d [Reason:] For a sharded collection, mergeChunks combines contiguous chunk ranges on a shard into a single chunk.

6. Which of the following command that validates index on shard key ?
a) checkShardingIndex
b) checkSIndex
c) enableSharding
d) all of the mentioned

View Answer

Answer: a [Reason:] checkShardingIndex is an internal command that supports the sharding functionality.

7. Which of the following command is used to determine split points ?
a) splitVector
b) medianKey
c) movePrimary
d) none of the mentioned

View Answer

Answer: a [Reason:] movePrimary reassigns the primary shard when removing a shard from a sharded cluster.

8. You can only issue listShards against the ________ database.
a) local
b) admin
c) temp
d) none of the mentioned

View Answer

Answer: b [Reason:] listShards is only available for mongos instances.

9. _________ is an internal command that supports the sharding functionality.
a) getBalancerHost()
b) getShardMap
c) enableSharding()
d) all of the mentioned

View Answer

Answer: b [Reason:] sh.getBalancerHost() returns the name of a mongos that’s responsible for the balancer process.

10. ________ command verifies that a process is a mongos.
a) medianKey
b) isdbgrid
c) movePrimary
d) none of the mentioned

View Answer

Answer: b [Reason:] The isdbgrid command is not available to mongod.

MongoDB MCQ Set 4

1. Which of the following provides low-level tracing/sniffing view into database activity ?
a) mongosniff
b) mongotop
c) mongooplog
d) mongofiles

View Answer

Answer: a [Reason:] mongosniff is a command-line tool providing a sniffing view into database activity by monitoring network traffic going to and from MongoDB.

2. Point out the correct statement :
a) MongoDB supports a “standalone” or single-instance operation
b) Sharded clusters provide high performance replication with automated failover
c) Replica sets make it possible to partition large data sets over many machines transparently to the users
d) All of the mentioned

View Answer

Answer: a [Reason:] MongoDB users combine replica sets and sharded clusters to provide high levels redundancy for large data sets transparently for

applications.

3. Which of the following is simplest tool for installation of MongoDB ?
a) mongorestore
b) mongooplog
c) mongodump
d) all of the mentioned

View Answer

Answer: b [Reason:] mongooplog is a simple tool that polls operations from the replication oplog of a remote server.

4. Which of the following network analyzer fully supports MongoDB ?
a) Wireshark
b) Riakshark
c) Snort
d) Suricata

View Answer

Answer: a [Reason:] Wireshark is cross platform and open source network sniffer.

5. Point out the wrong statement :
a) BSON is difficult to code and manage
b) MongoDB stores data in JSON documents
c) JSON provides a rich data model that seamlessly maps to native programming language types
d) All of the mentioned

View Answer

Answer: a [Reason:] BSON is easy to code and manage.

6. ___________ manipulate files stored in your MongoDB instance in GridFS.
a) mongorestore
b) mongofiles
c) mongosupport
d) none of the mentioned

View Answer

Answer: b [Reason:] mongofiles provides an interface between objects stored in your file system and GridFS.

7. __________ is a command-line utility to import content from a JSON, CSV, or TSV.
a) mongorestore
b) mongofiles
c) mongosupport
d) mongoimport

View Answer

Answer: d [Reason:] Import content from a JSON, CSV, or TSV export is created by mongoexport.

8. Which of the following is used for creating a binary export of the contents of a Mongo database ?
a) mongodump
b) mongofiles
c) mongosupport
d) mongoimport

View Answer

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

9. Which of the following tool can be used to reload a database dump ?
a) mongorestore
b) mongofiles
c) mongosupport
d) none of the mentioned

View Answer

Answer: a [Reason:] The mongorestore program writes data from a binary database dump created by mongodump to a MongoDB instance.

10. _____________ is a native OS-X-application for MongoDB management.
a) Opricot
b) MongoHub
c) UMongo
d) 3T MongoChe

View Answer

Answer: b [Reason:] Opricot is a browser-based MongoDB-Shell, implemented in PHP.

MongoDB MCQ Set 5

1. Which of the following language is MongoDB written in ?
a) Javascript
b) C
c) C++
d) All of the mentioned

View Answer

Answer: d [Reason:] MongoDB (from humongous) is a cross-platform document-oriented database.

2. Point out the correct statement :
a) MongoDB is classified as a NoSQL database
b) MongoDB favours XML format more than JSON
c) MongoDB is column oriented database store
d) All of the mentioned

View Answer

Answer: a [Reason:] MongoDB supports JSON format compared to XML.

3. Which of the following format is supported by MongoDB ?
a) SQL
b) XML
c) BSON
d) All of the mentioned

View Answer

Answer: c [Reason:] MongoDB eschews the traditional table-based relational database structure in favor of JSON-like documents with dynamic schemas.

4. MongoDB Queries can return specific fields of documents which also include user-defined __________ functions.
a) Javascript
b) C
c) C++
d) All of the mentioned

View Answer

Answer: a [Reason:] MongoDB supports search by field, range queries, regular expression searches.

5. Point out the wrong statement :
a) Secondary indices is not available in MongoDB
b) MongoDB supports search by field, range queries, regular expression searches
c) MongoDB can store the business subject in the minimal number of documents
d) All of the mentioned

View Answer

Answer: a [Reason:] Any field in a MongoDB document can be indexed.

6. Initial release of MongoDB was in the year :
a) 2000
b) 2005
c) 2009
d) 2011

View Answer

Answer: c [Reason:] MongoDB is developed by the software company 10gen in October 2007 as a component of a planned platform as a service product.

7. MongoDB has been adopted as ________ software by a number of major websites and services.
a) frontend
b) backend
c) proprietary
d) all of the mentioned

View Answer

Answer: b [Reason:] MongoDB is the most popular NoSQL database system.

8. MongoDB is a _________ database that provides high performance, high availability, and easy scalability.
a) graph
b) key value
c) document
d) all of the mentioned

View Answer

Answer: c [Reason:] Documents (objects) map nicely to programming language data types.

9. Dynamic schema in MongoDB makes ____________ easier for applications.
a) inheritance
b) polymorphism
c) encapsulation
d) none of the mentioned

View Answer

Answer: b [Reason:] Relational databases require that schemas be defined before you can add data.

10. With ________ MongoDB supports a complete backup solution and full deployment monitoring.
a) MMS
b) AMS
c) CMS
d) DMS

View Answer

Answer: a [Reason:] MMS stands for MongoDB Management Service and is available to all users in the cloud and on-premises as part of MongoDB Standard and Enterprise Subscriptions.

MongoDB MCQ Set 6

1. MongoDB provides high ____________ with replica sets.
a) performance
b) availability
c) scalability
d) none of the mentioned

View Answer

Answer: b [Reason:] A replica set consists of two or more copies of the data.

2. Point out the correct statement :
a) MongoDB cannot be used as a file system
b) MongoDB can run over single servers only
c) Embedded documents and arrays reduce need for joins
d) None of the mentioned

View Answer

Answer: c [Reason:] MongoDB can run over multiple servers, balancing the load and/or duplicating data to keep the system up and running in case of hardware failure.

3. ___________ replicas maintain a copy of the data on the primary using built-in replication.
a) Primary
b) Secondary
c) Backup
d) All of the mentioned

View Answer

Answer: b [Reason:] When a primary replica fails, the replica set automatically conducts an election process to determine which secondary should become the primary.

4. MongoDB scales horizontally using _________ for load balancing purpose.
a) Replication
b) Partitioning
c) Sharding
d) None of the mentioned

View Answer

Answer: c [Reason:] The user chooses a shard key, which determines how the data in a collection will be distributed.

5. Point out the wrong statement :
a) Each replica set member will act in the role of primary replica only
b) The primary replica performs all writes and reads by default
c) Secondaries can also perform read operations, but the data is eventually consistent by default
d) None of the mentioned

View Answer

Answer: a [Reason:] Each replica set member may act in the role of primary or secondary replica at any time.

6. MongoDB can be used as a ____________, taking advantage of load balancing and data replication features over multiple machines for storing files.
a) AMS
b) CMS
c) File system
d) None of the mentioned

View Answer

Answer: a [Reason:] The data is split into ranges (based on the shard key) and distributed across multiple shards.

7. _____________ can be used for batch processing of data and aggregation operations.
a) Hive
b) MapReduce
c) Oozie
d) None of the mentioned

View Answer

Answer: b [Reason:] The aggregation framework enables users to obtain the kind of results for which the SQL GROUP BY clause is used.

8. MongoDB supports fixed-size collections called ____________ collections.
a) primary
b) secondary
c) capped
d) all of the mentioned

View Answer

Answer: c [Reason:] This type of collection maintains insertion order and, once the specified size has been reached, behaves like a circular queue.

9. MongoDB uses a ____________ lock that allows concurrent read access to a database but exclusive write access to a single write operation.
a) readers
b) readers-writer
c) writer
d) none of the mentioned

View Answer

Answer: b [Reason:] Before version 2.2, this lock was implemented on a per-mongod basis. Since version 2.2, the lock has been implemented at the database level.

10. Which of the following sorting is not supported by MongoDB ?
a) collation
b) collection
c) heap
d) none of the mentioned

View Answer

Answer: a [Reason:] MongoDB does not support collation-based sorting and is limited to byte-wise comparison via memcmp.