Correct Answer : 2009
Explanation : 10gen software company began developing MongoDB in 2007 as a component of a planned platform as a service product. In 2009, the company shifted to an open-source development model, with the company offering commercial support and other services. In 2013, 10gen changed its name to MongoDB Inc.Initial release date : 11 February 2009Founders : Kevin P. Ryan, Eliot Horowitz, Dwight Merriman
Correct Answer : All of the Above
Explanation : MongoDB (from humongous) is a cross-platform document-oriented database.
Correct Answer : MongoDB is classified as a NoSQL database
Explanation : MongoDB supports JSON format compared to XML.
Correct Answer : BSON
Explanation : MongoDB eschews the traditional table-based relational database structure in favor of JSON-like documents with dynamic schemas.
Correct Answer : Javascript
Explanation : MongoDB supports search by field, range queries, regular expression searches.
Correct Answer : backend
Explanation : MongoDB is the most popular NoSQL database system.
Correct Answer : document
Explanation : Documents (objects) map nicely to programming language data types.
Correct Answer : polymorphism
Explanation : Relational databases require that schemas be defined before you can add data.
Correct Answer : MMS
Explanation : 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.
Correct Answer : availability
Correct Answer : Secondary
Explanation : When a primary replica fails, the replica set automatically conducts an election process to determine which secondary should become the primary.
Correct Answer : Sharding
Explanation : The user chooses a shard key, which determines how the data in a collection will be distributed.
Correct Answer : AMS
Explanation : The data is split into ranges (based on the shard key) and distributed across multiple shards.
Correct Answer : MapReduce
Explanation : The aggregation framework enables users to obtain the kind of results for which the SQL GROUP BY clause is used.
Correct Answer : collation
Explanation : MongoDB does not support collation-based sorting and is limited to byte-wise comparison via memcmp.
Correct Answer : Readers-writer
Explanation : 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.
Correct Answer : capped
Explanation : This type of collection maintains insertion order and, once the specified size has been reached, behaves like a circular queue.
Correct Answer : SQL Server
Explanation : Microsoft SQL Server is a relational database management system developed by Microsoft.
Correct Answer : Document databases
Explanation : Document databases pair each key with a complex data structure known as a document.
Correct Answer : Cassandra
Explanation : Wide-column stores such as Cassandra and HBase are optimized for queries over large datasets, and store columns of data together, instead of rows.
Correct Answer : SAN
Explanation : “Sharding” a database across many server instances can be achieved with SQL databases, but usually is accomplished through SANs and other complex arrangements for making hardware act as a single server.
Correct Answer : replication
Explanation : The storage environment is essentially virtualized from the developer’s perspective.
Correct Answer : Key-value
Explanation : Every single item in the database is stored as an attribute name (or “key”), together with its value in Key-value stores.
Correct Answer : Graph
Explanation : Graph stores include Neo4J and HyperGraphDB.
Correct Answer : unstructured
Explanation : MongoDB is an a typical choice for unstructured data storage.
Correct Answer : mongo
Explanation : Interactive shell lets developers view, insert, remove, and update data in their databases, as well as get replication information, set up sharding, shut down servers, execute JavaScript, and more.
Correct Answer : web interface
Explanation : Web interface is a simple webpage that serves information about the current server status. By default, this interface is 1000 ports above the database port (28017).
Correct Answer : Database Master
Explanation : Futon4Mongo is a clone of the CouchDB-Futon-Web-Interface for MongoDB.
Correct Answer : mongotop
Explanation : mongotop is a command-line tool providing a method to track the amount of time a MongoDB instance spends reading and writing data.
Correct Answer : mongostat
Explanation : It describes how many inserts, updates, removes, queries, and commands were performed, as well as what percentage of the time the database was locked and how much memory it is using.
Correct Answer : vmstat
Explanation : vmstat is a computer system monitoring tool that collects and displays summary information about operating system memory, processes, interrupts, paging and block I/O.
Explanation : By default, mongotop returns values every second.
Correct Answer : Libpcap
Explanation : A cross-platform alternative is an open source Wireshark packet analyzer which has full support for the MongoDB wire protocol.
Correct Answer : mongodb-enterprise
Explanation : mongodb-enterprise is a metapackage that will automatically install the four component packages.
Correct Answer : mongodb-enterprise-server
Explanation : mongodb-enterprise-mongos package contains the mongos daemon.
Correct Answer : mongodown
Explanation : mongodb-enterprise-tools package contains the following MongoDB tools: mongoimport bsondump, mongodump, mongoexport, mongofiles, mongoimport, mongooplog, mongoperf, mongorestore, mongostat, and mongotop.
Correct Answer : 12.04
Explanation : The package structure and names have changed as of version 2.6.
Correct Answer : dpkg
Explanation : The Ubuntu package management tools (i.e. dpkg and apt) ensure package consistency and authenticity by requiring that distributors sign packages with GPG keys.
Correct Answer : sudo apt-get install mongodb-enterprise
Explanation : To install a specific release of MongoDB Enterprise, specify each component package individually and append the version number to the package name.
Correct Answer : sudo service mongod stop
Explanation : To stop MongoDB, press Control+C in the terminal where the mongod instance is running.
Correct Answer : mongodump
Explanation : mongodump can read data from either mongod or mongos instances, in addition to reading directly from MongoDB data files without an active mongod.
Correct Answer : backup
Explanation : The backup role provides the required privileges for backing up all databases.
Correct Answer : mongos
Explanation : From the perspective of the application, a mongos instance behaves identically to any other MongoDB instance.
Correct Answer : logpath
Explanation : By default, MongoDB overwrites the log file when the process restarts.
Correct Answer : mongod
Explanation : It handles data requests, manages data access, and performs background management operations.
Correct Answer : mongofiles
Explanation : All mongofiles commands have the following form:mongofiles <options> <commands> <filename>.
<options> <commands> <filename>
Correct Answer : bsondump
Explanation : The bsondump converts BSON files into human-readable formats, including JSON.
Explanation : mongo provides complete access to the JavaScript language and all standard functions as well as a full database interface for MongoDB.
Correct Answer : localhost
Explanation : To connect to a server on a different port or interface, use the –port and –host options.
Correct Answer : test
Explanation : At any time, db operation at the mongo shell is used to report the name of the current database.
Correct Answer : find
Explanation : The find() method with no parameters returns all documents from a collection and returns all fields for the documents.
Correct Answer : show databases
Explanation : show databases is new in version 2.4.
Correct Answer : use mydb
Explanation : Confirm that your session has the mydb database as context, by checking the value of the db object, which returns the name of the current database.
Explanation : The find() method returns a cursor. To iterate the cursor and return more documents, type it in the mongo shell.
Correct Answer : 12
Explanation : You can provide _id while inserting the document.
Correct Answer : insertData("test", "testData", 400)
Explanation : If the collection and database do not exist, MongoDB creates them implicitly before inserting documents.
Correct Answer : mongorc.js
Explanation : Store the function in your .mongorc.js file.
Correct Answer : it
Explanation : The db.collection.find() method returns a cursor. To access the documents, you need to iterate the cursor.
Correct Answer : sort()
Explanation : You can modify the query to impose limits, skips, and sort orders.
Correct Answer : $match
Explanation : Operations that modify existing documents (i.e. updates) use the same query syntax as queries to select documents to update.
Correct Answer : findOne()
Explanation : MongoDB provides a db.collection.findOne() method as a special case of find() that returns a single document.
Correct Answer : find()
Explanation : Projections are the second argument to the find() method, which specifies a list of fields to return or list fields to exclude in the result documents.
Correct Answer : db.records.find( { “user_idâ€: { $lt: 42 } }, { “historyâ€: 0 } )
Explanation : Query uses the projection { “history”: 0 } to exclude the history field from the documents in the result set.
Correct Answer : $project
Explanation : For related projection functionality in the aggregation framework pipeline, use the $project pipeline stage.
Correct Answer : _id: 0
Explanation : By default, the _id field is included in the results.
Correct Answer : projection
Explanation : Queries specify criteria, or conditions, that identify the documents that MongoDB returns to the clients.
Correct Answer : collections
Explanation : Collections are analogous to a table in relational databases.
Correct Answer : CRUD
Explanation : Data modification refers to operations that create, update, or delete data.
Correct Answer : insert
Explanation : For the update and delete operations, you can specify the criteria to select the documents to update or remove.
Correct Answer : read
Explanation : For replica sets and sharded clusters with replica set components, applications specify read preferences.
Correct Answer : write
Explanation : Write concern semantics allow clients to specify the assurance that MongoDB provides when reporting on the success of a write operation.
Correct Answer : Map-reduce
Explanation : In addition to the basic queries, MongoDB provides several data aggregation features.
Correct Answer : data processing
Explanation : MongoDB can return counts of the number of documents that match a query, or return the number of distinct values for a field.
Correct Answer : RAM
Explanation : Querying only the index can be much faster than querying documents outside of the index.
Correct Answer : explain()
Explanation : db.collection.explain() provides information on the execution of other operations, such as db.collection.update().
Correct Answer : OP_UPDATE
Explanation : Only the OP_QUERY and OP_GET_MORE messages result in a response from the database.
Correct Answer : update()
Explanation : By default, the update() method updates a single document.
Correct Answer : cursor.explain()
Explanation : This information can help as you develop indexing strategies.
Correct Answer : ordered
Explanation : An ordered query plan has returned all the matching results.
Correct Answer : References
Explanation : Applications can resolve these references to access the related data. Broadly, these are normalized data models.
Explanation : No single write operation can atomically affect more than one document or more than one collection.
Correct Answer : 8KB
Explanation : Adding an index has some negative performance impact for write operations.
Correct Answer : pre-allocation
Explanation : A data model that embeds related data in a single document facilitates atomic operations.
Correct Answer : 2 Sized
Explanation : When using MMAPv1, if your applications require updates that will frequently cause document growth to exceeds the current power of 2 allocation, you may want to refactor your data model to use references between data in distinct documents rather than a denormalized data model.
Correct Answer : MAPv3
Explanation : Normalizing the data would split the data across multiple collections and would require multiple write operations that are not atomic collectively.
Correct Answer : Embedded
Explanation : As a result, applications may need to issue fewer queries and updates to complete common operations.
Correct Answer : contains
Explanation : Embedding provides better performance for read operations.
Correct Answer : references
Explanation : Normalized data models can require more round trips to the server.
Correct Answer : dot
Explanation : References provides more flexibility than embedding.
Correct Answer : namespaces
Explanation : The namespace file defaults to 16 MB.
Correct Answer : db.system.namespaces.count()
Explanation : The limit on the number of namespaces depend on the <database>.ns size.
<database>.ns size
Correct Answer : FIFO
Explanation : Capped collections efficiently support operations that insert and read documents based on insertion order.
Correct Answer : One-to-Many Relationships with Embedded Documents
Explanation : One-to-Many Relationships with document references presents a data model that uses references to describe one-to-many relationships between documents.
Explanation : When using references, the growth of the relationships determine where to store the reference.
Correct Answer : Query selector
Explanation : Update definitions, which define what fields to modify during an update.
Correct Answer : None of the mentioned
Explanation : BSON documents may have more than one field with the same name.
Explanation : MongoDB stores documents on disk in the BSON serialization format. BSON is a binary representation of JSON documents, though it contains more data types than JSON.
Correct Answer : Parent
Explanation : Data model that describes a tree-like structure in MongoDB documents by storing references to “parent” nodes in children nodes.
Explanation : You can query by the parent field to find its immediate children nodes.
Correct Answer : Child
Explanation : Node may have multiple parents for Child Parents.
Correct Answer : Array of Ancestors
Explanation : 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.
Correct Answer : Materialized Paths
Explanation : 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.
Explanation : 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.
Correct Answer : None of the above
Explanation : The Nested Sets pattern provides a fast and efficient solution for finding subtrees but is inefficient for modifying the tree structure.
Correct Answer : All of the above
Explanation : In MongoDB, write operations, e.g. db.collection.update(), db.collection.findAndModify(), db.collection.remove(), are atomic on the level of a single document.
Correct Answer : Asynchronous
Explanation : MongoDB can support keyword searches using specific data models and multi-key indexes;
Correct Answer : text
Explanation : MongoDB provides text indexes to support text search of string content in documents of a collection.
Correct Answer : Ranking
Explanation : The keyword look ups described in this document do not provide a way to weight results.
Correct Answer : Synonyms
Explanation : MongoDB can support keyword searches using specific data models and multi-key indexes.
Correct Answer : strings
Explanation : You can then create a multi-key index on the array and create queries that select values from the array.
Correct Answer : GridFS
Explanation : Instead of storing a file in a single document, GridFS divides a file into parts, or chunks.
Correct Answer : 255
Explanation : GridFS is useful not only for storing files that exceed 16MB but also for storing any files for which you want access without having to load the entire file into memory.
Correct Answer : client
Explanation : You also can access information from arbitrary sections of files, which allows you to “skip” into the middle of a video or audio file.
Explanation : As a client program assembles a query in MongoDB, it builds a BSON object, not a string.
Correct Answer : unique
Explanation : The files_id field contains the _id of the chunk’s “parent” document.
Correct Answer : primary
Explanation : Object_Id is unique and cannot be changed.
Correct Answer : _id
Explanation : ID value value must be unique in the collection, is immutable, and may be of any type other than an array.
Explanation : The _id field may contain values of any BSON data type, other than an array.
Correct Answer : toString()
Explanation : In previous versions, toString() returns the hexadecimal string representation, which as of version 2.2 can be retrieved by the str property.
Correct Answer : x = ObjectId()
Explanation : ObjectId() constructor is used with no argument for new object.
Explanation : The value of a field can be any of the BSON data types.
Correct Answer : JSON
Explanation : BSON contains more data types than JSON.
Correct Answer : field1: value1
Explanation : The value of a field can be any of the BSON data types, including other documents, arrays, and arrays of documents.
Correct Answer : Grid
Explanation : MongoDB preserves the order of the document fields following write operations.
Correct Answer : BinData
Explanation : Most MongoDB driver clients will include the _id field and generate an ObjectId before sending the insert operation to MongoDB.
Correct Answer : journaling
Explanation : Without journaling enabled, there is no guarantee that the snapshot will be consistent or valid.
Explanation : mongodump is a utility for creating a binary export of the contents of a database.
Correct Answer : cp
Explanation : Since copying multiple files is not an atomic operation, you must stop all writes to the mongod before copying the files.
Correct Answer : mongorestore
Explanation : This tool is not ideal for capturing backups of larger systems.
Correct Answer : –oplog
Explanation : To restore a point in time backup created with –oplog, use mongorestore with the –oplogReplay option.
Explanation : Applications may continue modifying data while mongodump captures the output.
Correct Answer : LVM
Explanation : You can create a backup by copying MongoDB’s underlying data files.
Correct Answer : secondary
Explanation : Alternatively, you can shut down a secondary and use mongodump with the data files directly.
Correct Answer : Ops Manager
Explanation : This tool is available with Enterprise Advanced subscriptions.
Correct Answer : Automation
Explanation : Ops Manager Monitoring provides real-time reporting, visualization, and alerting on key database and hardware indicators.
Correct Answer : Backup
Explanation : Backup can also create snapshots of standalones that are run as single-member replica sets.
Explanation : Backup takes and stores snapshots based on a user-defined snapshot retention policy.
Correct Answer : HTTPS
Explanation : Ops Manager Backup lets you restore data from a scheduled snapshot or from a selected point between snapshots.
Correct Answer : head
Explanation : The head database is consistent with the original primary up to the last oplog supplied by the agent.
Correct Answer : standalones
Explanation : A lightweight Backup Agent runs within your infrastructure and backs up data from the MongoDB processes you have specified.
Correct Answer : db.serverStatus()
Explanation : serverStatus outputs an account of the state of a MongoDB instance.
Explanation : The replSetGetStatus command (rs.status() from the shell) returns an overview of your replica set’s status.
Explanation : Use mongostat to understand the distribution of operation types and to inform capacity planning.
Explanation : Use mongotop to check if your database activity and use match your expectations.
Correct Answer : db.currentOp
Explanation : MongoDB includes a number of commands that report on the state of the database.
Explanation : This command is rarely run directly.
Correct Answer : collstats
Explanation : It also includes count of the objects in the collection, the size of the collection, the amount of disk space used by the collection, and information about its indexes.
Correct Answer : dbStats
Explanation : The dbStats command, or db.stats() from the shell, returns a document that addresses storage use and data volumes.
Correct Answer : globalLock.activeClients
Explanation : The activeClients data structure provides more granular information about the number of connected clients and the operation types (e.g. read or write) performed by these clients.
Correct Answer : admin.system.roles
Explanation : System collections include these collections stored in the admin database
Correct Answer : mem.resident
Explanation : 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.
Correct Answer : rs.conf()
Explanation : Custom read preferences and write concerns evaluate tags sets in different ways.
Correct Answer : iostat
Explanation : Specify the number of seconds when running iostat to avoid displaying stats covering the time since server boot.
Correct Answer : operationProfiling.slowOpThresholdMs
Explanation : systemLog.verbosity controls the amount of logging output that mongod write to the log.
Correct Answer : MMAPv1
Explanation : MongoDB includes support for two storage engines: MMAPv1, the storage engine available in previous versions of MongoDB, and WiredTiger
Correct Answer : readers-writer
Explanation : Each database has a readers-writer lock that allows concurrent read access to a database, but gives exclusive access to a single write operation per database.
Correct Answer : write ahead
Explanation : Leave journaling enabled in order to ensure that mongod will be able to recover its data files and keep the data files in a valid state following a crash.
Correct Answer : Write
Explanation : The strength of the write concerns determine the level of guarantee.
Correct Answer : connPoolStats
Explanation : To avoid overloading the connection resources of a single mongod or mongos instance, ensure that clients maintain reasonable connection pool sizes.
Correct Answer : RAID-0
Explanation : While RAID-0 provides good write performance, it also provides limited availability and can lead to reduced performance on read operations, particularly when using Amazon’s EBS volumes.
Correct Answer : XFS
Explanation : Some Linux distributions require different versions of the kernel to support using XFS.
Correct Answer : fsync()
Explanation : HGFS and Virtual Box’s shared folders do not support this operation.
Correct Answer : EC2
Explanation : MongoDB is compatible with EC2.
Correct Answer : snappy
Explanation : snappy provides a lower compression rate but has little performance cost
Correct Answer : NSS
Explanation : Use the Network Time Protocol (NTP) to synchronize time among your hosts.
Correct Answer : bwm-ng
Explanation : If you suspect a network-based bottleneck, you may use bwm-ng to begin your diagnostic process.
Correct Answer : slowOpThresholdMs
Explanation : The operationProfiling.slowOpThresholdMs setting is available only for mongod.
Correct Answer : locks.deadlockCount
Explanation : The globalLock data structure contains information regarding the database’s current lock state, historical lock status, current operation queue, and the number of active clients.
Correct Answer : globalLock.totalTime
Explanation : The value of totalTime represents the time, in microseconds, since the database last started and creation of the globalLock.
Correct Answer : currentQueue
Explanation : The serverStatus command returns a document that provides an overview of the database process’s state
Correct Answer : rangeDelete
Explanation : You may only dynamically include top-level fields from the serverStatus document that are not included by default.
Correct Answer : Profiler
Explanation : Enable the profiler by setting the profile value using the following command in the mongo shell.
Correct Answer : Local
Explanation : It is stored specifically for replication purposes.
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.
Correct Answer : admin.system.users
Explanation : Users may define authorization roles in the admin.system.roles collection.
Correct Answer : system.js
Explanation : To store a function, you can use the db.collection.save().
Correct Answer : db.loadServerScripts()
Explanation : The documents in the system.js collection provide functions that your applications can use in any JavaScript context with MongoDB in this database.
Correct Answer : system.profile
Explanation : The database profiler writes data in the system.profile collection, which is a capped collection.
Correct Answer : system.profile.locks
Explanation : MongoDB uses reader-writer locks that allow concurrent readers shared access to a resource, such as a database or collection, but give exclusive access to a single write operation.
Correct Answer : Collection
Explanation : Database represents database lock.
Correct Answer : system.profile.locks.acquireCount
Explanation : system.profile.locks.acquireWaitCount is number of times the operation had to wait for the acquireCount lock acquisitions because the locks were held in a conflicting mode. acquireWaitCount is less than or equal to acquireCount.
Correct Answer : .mongorc.js
Explanation : You can disable this behavior by passing the mongo –norc option.
Correct Answer : Windows
Explanation : On Linux and Unix systems, mongo reads the .mongorc.js file from $HOME/.mongorc.js.
Correct Answer : 1000
Explanation : By default, the HTTP interface port is 28017, but is indirectly set using the port option which allows you to configure the primary mongod port.
Correct Answer : REST
Explanation : The REST interface is disabled by default, and is not recommended for production use.
Explanation : Clients connect to mongos instances, which behave from the client’s perspective as mongod instances.
Correct Answer : 27019
Explanation : You also can run a config server by using the configsvr value for the clusterRole setting in a configuration file.
Correct Answer : syslog
Explanation : MongoDB provides an option to send output to the host’s syslog system.
Correct Answer : local
Explanation : Remote document contains the remote ip address and the port number of the incoming connection associated with the event.
Correct Answer : auditAuthorizationSuccess
Explanation : System Event Audit Message is available only in MongoDB Enterprise.
Correct Answer : Server
Explanation : Printing audit events to a file in JSON format degrades server performance more than printing to a file in BSON format.
Explanation : The following converts the audit log into a human-readable form and output to the terminal: bsondump data/db/auditLog.bson.
Explanation : The auditing system will neither detect the truncation nor error upon its occurrence.
Correct Answer : db.createUser()
Explanation : MongoDB provides the db.createUser() to add and manage user information.
Correct Answer : system.users
Explanation : MongoDB stores all user information, including name, password, and the user’s database, in the system.users collection in the admin database.
Correct Answer : SCRAM-SHA-1
Explanation : SCRAM-SHA-1 verifies supplied user credentials against the user’s name, password and database.
Correct Answer : MONGODB-CR
Explanation : Using key files, you can also use MONGODB-CR authentication for the internal member authentication of replica set members and sharded cluster members.
Correct Answer : x.509
Explanation : To authenticate to servers, clients can use x.509 certificates instead of usernames and passwords.
Correct Answer : service principal
Explanation : Service principal names must be reachable over the network using the fully qualified domain name (FQDN) part of its service principal name.
Correct Answer : roles
Explanation : By creating a role with privileges that are scoped to a specific collection in a particular database, administrators can provision users with roles that grant privileges on a collection level.
Correct Answer : grantRole
Explanation : Apply this action to database resources.
Correct Answer : revokeRole
Explanation : User can view information about any role in the given database through viewRole.
Correct Answer : db.killOp()
Explanation : Only use db.killOp() to terminate operations initiated by clients and do not terminate internal database operations.
Correct Answer : cleanupOrphaned
Explanation : If two contiguous ranges do not belong to the shard, the cleanupOrphaned examines both ranges for orphaned documents.
Correct Answer : invalidateUserCache
Explanation : invalidateUserCache allows you to purge the cache at any given moment, regardless of the interval set in the userCacheInvalidationIntervalSecs parameter.
Correct Answer : displayCacheListPlans
Explanation : The query optimizer only caches the plans for those query shapes that can have more than one viable plan.
Correct Answer : home
Explanation : The mongod and mongos instances run with the http interface disabled by default.
Correct Answer : Rest
Explanation : The REST interface does not support any authentication and you should always restrict access to this interface to only allow trusted clients to connect to this port.
Correct Answer : bindIp
Explanation : You can also specify a number of interfaces by passing bindIp a comma separated list of IP addresses.
Correct Answer : port
Explanation : Setting port also indirectly sets the port for the HTTP status interface, which is always available on the port numbered 1000 greater than the primary mongod port.
Correct Answer : netsh
Explanation : To minimize overall exposure, ensure that only traffic from trusted sources can reach mongod and mongos instances and that the mongod and mongos instances can only connect to trusted outputs.
Explanation : Given the default ports of all MongoDB processes, you must configure networking rules that permit only required communication between your application and the appropriate mongod.exe and mongos.exe instances.
Correct Answer : Aggregations
Explanation : MongoDB provides a rich set of aggregation operations that examine and perform calculations on the data sets.
Explanation : Like queries, aggregation operations in MongoDB use collections of documents as an input and return results in the form of one or more documents.
Correct Answer : pipeline
Explanation : MongoDB 2.2 introduced a new aggregation framework, modeled on the concept of data processing pipelines.
Correct Answer : filters
Explanation : Other pipeline operations provide tools for grouping and sorting documents by specific field.
Correct Answer : operators
Explanation : User can remove any role from any user from any database in the system.
Correct Answer : finally
Explanation : Certain mongo shell functions and properties are inaccessible in map-reduce operations.
Correct Answer : indexes
Explanation : Both the aggregation pipeline and map-reduce can operate on a sharded collection.
Correct Answer : 2.2
Explanation : The aggregation pipeline provides an alternative to map-reduce.
Correct Answer : db.collection.aggregate
Explanation : In the mongo shell, if the cursor returned from the db.collection.aggregate() is not assigned to a variable using the var keyword, then the mongo shell automatically iterates the cursor up to 20 times.
Correct Answer : cursor.hasNext()
Explanation : cursor.hasNext() returns true if the cursor returned by the db.collection.find() query can iterate further to return more documents.
Explanation : The mongo shell iterates the returned cursor automatically to print the results.
Correct Answer : cursor: { batchSize: }
Explanation : A batchSize of 0 means an empty first batch and is useful for quickly returning a cursor or failure message without doing significant server-side work.
Correct Answer : collection
Explanation : If an index filter exists for a given query shape, the optimizer only considers those indexes specified in the filter.
Explanation : $match uses standard MongoDB queries. For each input document, outputs either one document (a match) or zero documents (no match).
Correct Answer : $redact
Explanation : $redact reshapes each document in the stream by restricting the content for each document based on information stored in the documents themselves.
Correct Answer : $limit
Explanation : For each input document, outputs either one document (for the first n documents) or zero documents (after the first n documents).
Correct Answer : $geoNear
Explanation : The output documents include an additional distance field and can include a location identifier field.
Correct Answer : $unwin
Explanation : Each output document replaces the array with an element value.
Explanation : $geoNear returns an ordered stream of documents based on the proximity to a geospatial point.
Correct Answer : $setEquals
Explanation : $setEquals accepts two or more argument expressions.
Correct Answer : $setIntersection
Explanation : $setIntersection returns a set with elements that appear in all of the input sets.
Correct Answer : $setUnion
Explanation : $setUnion performs set operation on arrays, treating arrays as sets.
Explanation : $setDifference returns a set with elements that appear in the first set but not in the second set.
Correct Answer : $anyElementTrue
Explanation : $anyElementTrue returns true if any elements of a set evaluate to true; otherwise, returns false.
Correct Answer : 1 and 31
Explanation : The $dayOfMonth expression has the following syntax: { $dayOfMonth: }.
Correct Answer : $dayOfYear
Explanation : The $dayOfYear expression has the following syntax:{ $dayOfYear: }.
Correct Answer : $year
Explanation : $year returns the year for a date as a number (e.g. 2014).
Correct Answer : $hour
Explanation : The argument in hour statement can be any expression as long as it resolves to a date.
Correct Answer : $dateToString
Explanation : $dateToString converts a date object to a string according to a user-specified format.
Correct Answer : $ifNull
Explanation : $ifNull returns the result of the second expression if the first expression results in a null result.
Correct Answer : Accumulators
Explanation : Accumulators are available only for the $group stage.
Correct Answer : Map
Explanation : MongoDB provides a number of different index types to support specific types of data and queries.
Correct Answer : Single
Explanation : If applications do not specify a value for _id the driver or the mongod will create an _id field with an ObjectId value.
Correct Answer : compound
Explanation : The order of fields listed in a compound index has significance.
Correct Answer : multikey
Explanation : If you index a field that holds an array value, MongoDB creates separate index entries for every element of the array.
Correct Answer : 2dsphere
Explanation : To support efficient queries of geospatial coordinate data, MongoDB provides two special indexes.
Explanation : These text indexes do not store language-specific stop words (e.g. “the”, “a”, “or”) and stem the words in a collection to only store root words.
Explanation : In version 2.2 and newer, capped collections do have an _id field, except those in the local database.
Explanation : If you choose flat surface calculations via a 2d index, you can store data only as legacy coordinate pairs.
Correct Answer : $geoWithin
Explanation : $geoWithin selects documents with geospatial data that exists entirely within a specified shape.
Correct Answer : $geometry
Explanation : For $geoWithin, if you specify a single-ringed polygon that has an area greater than a single hemisphere, include the custom MongoDB coordinate reference system in the $geometry expression.
Correct Answer : CRS
Explanation : CRS stands for coordinate reference system.
Correct Answer : $within
Explanation : $within is deprecated since version 2.4.
Correct Answer : $box
Explanation : $box specifies a rectangle for a geospatial $geoWithin query to return documents that are within the bounds of the rectangle, according to their point-based location data.
Correct Answer : createIndex()
Explanation : To modify the index, you must drop the index first.
Correct Answer : db.collection.Index()
Explanation : This operation drops all indexes, including the _id index, and then rebuilds all indexes.
Explanation : For index builds, the effects of db.killOp() may not be immediate and may occur well after much of the index build operation has completed.
Correct Answer : getIndexes()
Explanation : When performing maintenance you may want to check which indexes exist on a collection.
Correct Answer : $maxDistance
Explanation : The measuring units for the maximum distance are determined by the coordinate system in use.
Explanation : Append the hint() method to the find() method.
Correct Answer : $geoIntersect
Explanation : The 2dsphere index supports $geoIntersects.
Correct Answer : $near
Explanation : $near requires a geospatial index.
Explanation : $geometry uses EPSG:4326 as the default coordinate reference system (CRS).
Correct Answer : $nearsphere
Explanation : The 2dsphere and 2d indexes support $nearSphere.
Correct Answer : $minDistance
Explanation : $minDistance is available for use with 2dsphere index only.
Correct Answer : Geospatial
Explanation : Only the 2d geospatial index supports $center.
Correct Answer : replica
Explanation : One mongod, the primary, receives all write operations.
Explanation : The primary accepts all write operations from clients.
Correct Answer : oplog
Explanation : If the primary is unavailable, the replica set will elect a secondary to be primary.
Correct Answer : arbiter
Explanation : Arbiters do not maintain a data set.
Explanation : If your replica set has an even number of members, add an arbiter to obtain a majority of votes in an election for primary.
Correct Answer : strict
Explanation : Arbiters can be a good way to provide replica set quorum functionality with a cheaper resource cost than a fully functional replica set member with a data set.
Correct Answer : failover
Explanation : Failover, in most situations does not require manual intervention.
Explanation : Replica set members keep the same data set but are otherwise independent.
Correct Answer : dbPath
Explanation : The storage.dbPath setting is available only for mongod.
Explanation : The data format used by mongodump from version 2.2 or later is incompatible with earlier versions of mongod.
Correct Answer : Delayed
Explanation : Use hidden members for dedicated tasks such as reporting and backups.
Correct Answer : db.fsyncUnlock()
Explanation : As a result, do not use these methods to ensure consistency for the purposes of creating backups.
Correct Answer : db.fsyncLock()
Explanation : Such reads are necessary to establish new connections to a mongod that enforces authorization checks.
Explanation : Typically you will use db.fsyncUnlock() following a database backup operation.
Correct Answer : “rolling backupâ€
Explanation : They may help you recover from various kinds of human error.
Correct Answer : Balancer
Explanation : Delayed members replicate chunk migrations with a delay.
Correct Answer : rs.addArb()
Explanation : rs.addArb() adds a new arbiter to an existing replica set.
Correct Answer : rs.freeze()
Explanation : rs.freeze() makes the current replica set member ineligible to become primary for the period specified.
Explanation : rs.conf() returns a document that contains the current replica set configuration.
Correct Answer : rs.printReplicationInfo()
Correct Answer : rs.reconfig()
Explanation : To reconfigure an existing replica set, first retrieve the current configuration with rs.conf(), modify the configuration document as needed, and then pass the modified document to rs.reconfig().
Correct Answer : rs.syncFrom()
Explanation : rs.syncFrom() provides a wrapper around the replSetSyncFrom, which allows administrators to configure the member of a replica set that the current member will pull data from.
Correct Answer : replSetReconfig
Explanation : The force parameter in reconfig method allows a reconfiguration command to be issued to a non-primary node.
Correct Answer : rs.slaveOk()
Explanation : Use readPref() and Mongo.setReadPref() to set read preference.
Correct Answer : priority
Explanation : Use this setting to ensure that some members are more likely to become primary and that others can never become primary.
Correct Answer : array
Explanation : The array index begins with 0. Do not confuse this index value with the value of the replica set member’s _id field in the array.
Explanation : When the primary steps down, the mongod closes all client connections.
Correct Answer : delayed
Explanation : The length of the secondary slaveDelay must fit within the window of the oplog.
Correct Answer : rs.remove()
Explanation : rs.remove() removes the member described by the hostname parameter from the current replica set.
Correct Answer : rs.help()
Explanation : rs.help() returns a basic help text for all of the replication related shell functions
Correct Answer : rs.printSlaveReplicationInfo()
Explanation : rs.printSlaveReplicationInfo() returns a formatted report of the status of a replica set from the perspective of the secondary member of the set.
Correct Answer : sharding
Explanation : Sharding is a method for storing data across multiple machines.
Correct Answer : 2
Explanation : MongoDB have two basic approaches: vertical scaling and sharding.
Explanation : Each shard is an independent database, and collectively, the shards make up a single logical database.
Explanation : Sharded cluster has the following components: shards, query routers and config servers.
Correct Answer : Query Routers
Explanation : The query router processes and targets operations to shards and then returns results to the clients.
Correct Answer : split
Explanation : The config database is internal: applications and administrators should not modify or depend upon its content in the course of normal operation.
Correct Answer : mergeChunks
Explanation : For a sharded collection, mergeChunks combines contiguous chunk ranges on a shard into a single chunk. Issue the mergeChunks command from a mongos instance.
Correct Answer : sh.status()
Explanation : To access the config database, connect to a mongos instance in a sharded cluster, and use the following helper: use config
Correct Answer : sh.splitFind()
Explanation : sh.splitFind() creates two roughly equal chunks.
Correct Answer : sh.splitAt
Explanation : In most circumstances, you should leave chunk splitting to the automated processes within MongoDB.
Correct Answer : median
Explanation : It may be beneficial to pre-split manually an empty collection using methods such as sh.splitFind().
Correct Answer : –chunkSize
Explanation : Modifying the chunk size has several limitations.
Correct Answer : sh._adminCommand()
Explanation : sh._adminCommand() runs a database command against the admin database, like db.runCommand(), but can confirm that it is issued against a mongos.
Correct Answer : sh._checkMongos()
Explanation : The sh._checkMongos() method throws an error message if the mongo shell is not connected to a mongos instance.
Correct Answer : sh.getBalancerLockDetails()
Explanation : sh._checkFullName() tests a namespace to determine if its well formed.
Correct Answer : sh._lastMigration()
Explanation : The sh._lastMigration() method returns a document with details about the last migration performed on the database or collection.
Correct Answer : sh.removeTagRange()
Explanation : Use sh.removeShardTag() to ensure that unused or out of date ranges are removed and hence chunks are balanced as required.
Correct Answer : sh.getBalancerState()
Explanation : sh.getBalancerState() returns true when the balancer is enabled and false if the balancer is disabled.
Correct Answer : sh.getBalancerHost()
Explanation : sh.enableSharding() enables sharding on a specific database.
Correct Answer : sh.disableBalancing()
Explanation : sh.disableBalancing() does not affect balancing of other collections in a sharded cluster.