
Enhance Your Career With Available Preparation Guide for C100DEV Exam
Get Special Discount Offer of C100DEV Certification Exam Sample Questions and Answers
For more info read reference:
MongoDB C100DEV Exam Reference
NEW QUESTION # 107
How to shutdown the server? (Mongo shell)
- A. use admin
- B. db.shutdown()
- C. use admin
- D. db.disconnect()
- E. db.shutdownServer()
- F. use admin
Answer: E
Explanation:
https://docs.mongodb.com/manual/reference/method/db.shutdownServer/
NEW QUESTION # 108
Which collection method do you need to use to drop a specific collection?
- A. db.collection.dropIndex()
- B. db.collection.remove()
- C. db.collection.drop()
- D. db.collection.dropCollection()
Answer: C
Explanation:
https://docs.mongodb.com/manual/reference/method/db.collection.drop/
NEW QUESTION # 109
Given a movies collection where each document has the following structure: { _id: ObjectId("573a1391f29313caabcd9264"), genres: [ 'Romance', 'Drama' ], title: 'The Divorcee', languages: [ 'English', 'French' ], year: 1930, imdb: { rating: 6.9, votes: 1740, id: 20827 }, countries: [ 'USA' ] } Which of the following queries will find all movies that have exactly 5 languages?
- A. db.movies.find( { languages: 5 } )
- B. db.movies.find( { languages: { $gt: 5 } } )
- C. db.movies.find( { languages: { $eq: 5 } } )
- D. db.movies.find( { languages: { $size: 5 } } )
Answer: D
Explanation:
https://docs.mongodb.com/manual/reference/operator/query/size/
NEW QUESTION # 110
Select all true statements about setting up a replica set in MongoDB.
- A. rs.initiate() should only be run on one node in the replica set.
- B. All nodes in a replica set must be running on the same port.
- C. When connecting to a replica set, the mongo shell will redirect to the connection to the primary node.
Answer: A,C
Explanation:
https://docs.mongodb.com/manual/replication/
NEW QUESTION # 111
Can arrays in MongoDB store values of different data types?
- A. Yes
- B. No
Answer: A
NEW QUESTION # 112
Select all true statements about auto bucketing feature in Aggregation Framework. ($bucketAuto stage)
- A. The syntax for this stage is as follows:
- B. This stage distributes documents evenly across predefined number of buckets.
- C. The granularity option allows us to specify preferred bucket boundaries.
Answer: A,B,C
Explanation:
https://docs.mongodb.com/manual/reference/operator/aggregation/bucketAuto/
NEW QUESTION # 113
Select all true statements regarding to indexes.
- A. Indexes are used to increase the speed of our queries.
- B. The _id field is not automatically indexed in collection.
- C. Indexes can improve write, update, and delete performance.
- D. Indexes reduce the number of documents that MongoDB must parse to satisfy a query.
Answer: A,D
Explanation:
https://docs.mongodb.com/manual/indexes/
NEW QUESTION # 114
We have a movies collection with the following document structure: { _id: ObjectId("573a1390f29313caabcd6223"), genres: [ 'Comedy', 'Drama', 'Family' ], title: 'The Poor Little Rich Girl', released: ISODate("1917-03-05T00:00:00.000Z"), year: 1917, imdb: { rating: 6.9, votes: 884, id: 8443 } } We need to use Aggregation Framework to fetch all movies from this collection where 'Drama' is in genres list and the minimum 'imdb.votes' is at least 100. Additionally, in the projection stage, we want to leave only the following fields: -> title -> genres -> imdb.votes We also want to sort the result set by decreasing imdb votes. Example output: [ { imdb: { votes: 1521105 }, genres: [ 'Crime', 'Drama' ], title: 'The Shawshank Redemption' }, { imdb: { votes: 1513145 }, genres: [ 'Crime', 'Drama' ], title: 'The Shawshank Redemption' }, { imdb: { votes: 1495351 }, genres: [ 'Action', 'Crime', 'Drama' ], title: 'The Dark Knight' }, ... Which pipeline should you use?
- A. [{ $match: { genres: { $in: ['Drama'] }, 'imdb.votes': { $gte: 100 } } }, { $project: { _id: 0, title: 1, genres: 1, 'imdb.votes': 1 } }, { $limit: { 'imdb.votes': -1 } }]
- B. [{ $match: { genres: { $in: ['Drama'] }, 'imdb.votes': { $gte: 100 } } }, { $project: { _id: 0, title: 1, genres: 1, 'imdb.votes': 1 } }, { $sort: { 'imdb.votes': -1 } }]
- C. [{ $match: { genres: { $in: ['Drama'] }, 'imdb.votes': { $gte: 100 } } }, { $project: { _id: 0, title: 1, genres: 1, 'imdb.votes': 1 } }, { $sort: { 'imdb.votes': 1 } }]
Answer: B
Explanation:
https://docs.mongodb.com/manual/reference/method/db.collection.aggregate/
NEW QUESTION # 115
You have the following replica set configuration: conf = { "_id": "replset", "version": 1, "protocolVersion": 1, "members": [ { "_id": 0, "host": "192.168.120.24:27017", "priority": 2, "votes": 1 }, { "_id": 1, "host": "192.168.120.24:27018", "priority": 1, "votes": 1 }, { "_id": 2, "host": "192.168.120.24:27018", "priority": 1, "votes": 1 } ] } Select all true statements about this configuration.
- A. This configuration is incorrect. Replica set cannot have three members.
- B. This configuration is incorrect. You can only specify a priority of 0 or 1.
- C. This configuration is incorrect. Host information must be unique for each member in a replica set.
- D. This configuration is correct.
Answer: C
Explanation:
https://docs.mongodb.com/manual/replication/#replication
NEW QUESTION # 116
Select all true statements regarding to replication in MongoDB.
- A. Replication is the primary mechanism for providing high availability in MongoDB.
- B. The primary node receives all new write operations, and the secondary nodes stay up to date with the primary.
- C. In the event of failover, the nodes vote to select the new primary node.
Answer: A,B,C
Explanation:
https://docs.mongodb.com/manual/replication/
NEW QUESTION # 117
Select all true statements about the $merge stage.
- A. $merge stage allows us to output the documents to a sharded collection.
- B. $merge stage must be the last in the pipeline.
- C. $merge stage allows us to output the documents to a collection in the same or different database.
Answer: A,B,C
Explanation:
https://docs.mongodb.com/manual/reference/operator/aggregation/merge/
NEW QUESTION # 118
Which of the following actions are granted to the built-in userAdmin role?
- A. createUser
- B. createRole
- C. dropCollection
- D. dropUser
- E. dropRole
- F. grantRole
Answer: A,B,D,E,F
Explanation:
https://docs.mongodb.com/manual/reference/built-in-roles/#mongodb-authrole-userAdmin
NEW QUESTION # 119
Which of the following roles provides the same read-only privileges as read role on all databases except local and config?
- A. readAnyDatabase
- B. userAdminAnyDatabase
- C. readWriteAnyDatabase
Answer: A
Explanation:
https://docs.mongodb.com/manual/reference/built-in-roles/#mongodb-authrole-readAnyDatabase
NEW QUESTION # 120
Which of the following rules (when ordering) should be followed when building query indexes?
- A. equality, range, sort
- B. range, sort, equality
- C. equality, sort, range
Answer: C
Explanation:
https://www.mongodb.com/blog/post/performance-best-practices-indexing
NEW QUESTION # 121
Suppose you have a companies collection in your database. Only the following documents are stored in this collection: { _id: ObjectId("52cdef7c4bab8bd675297da4"), name: 'Powerset', category_code: 'search', founded_year: 2006 }, { _id: ObjectId("52cdef7c4bab8bd675297da5"), name: 'Technorati', category_code: 'advertising', founded_year: 2002 }, { _id: ObjectId("52cdef7c4bab8bd675297da7"), name: 'AddThis', category_code: 'advertising', founded_year: 2004 }, { _id: ObjectId("52cdef7c4bab8bd675297da8"), name: 'OpenX', category_code: 'advertising', founded_year: 2008 }, { _id: ObjectId("52cdef7c4bab8bd675297daa"), name: 'Sparter', category_code: 'games_video', founded_year: 2007 }, { _id: ObjectId("52cdef7c4bab8bd675297dac"), name: 'Veoh', category_code: 'games_video', founded_year: 2004 }, { _id: ObjectId("52cdef7c4bab8bd675297dae"), name: 'Thoof', category_code: 'web', founded_year: 2006 } How many documents will be returned in response to the following aggregation pipeline? [{ $group: { _id: '$category_code', number_of_companies: { $sum: 1 } }}, { $sort: { number_of_companies: -1 }}, { $limit: 3 }]
- A. 0
- B. 1
- C. 2
- D. 3
Answer: B
Explanation:
https://docs.mongodb.com/manual/reference/operator/aggregation/group/
NEW QUESTION # 122
How does the document relate to the collection in MongoDB? Check all that apply.
- A. Collections consists of one or many documents.
- B. Documents are organized into collections.
- C. Documents consist of collections.
- D. Collections are tables of documents.
Answer: A,B
Explanation:
Explanation: https://docs.mongodb.com/manual/core/databases-and-collections/
NEW QUESTION # 123
We have an accounts collection with the following document structure: { _id: ObjectId("5ca4bbc7a2dd94ee5816239d"), account_id: 864905, limit: 10000, products: [ 'Commodity', 'InvestmentStock' ] }, { _id: ObjectId("5ca4bbc7a2dd94ee5816239e"), account_id: 299072, limit: 10000, products: [ 'InvestmentFund', 'InvestmentStock' ] }, { _id: ObjectId("5ca4bbc7a2dd94ee5816239f"), account_id: 137994, limit: 10000, products: [ 'CurrencyService', 'InvestmentStock' ] } We need to use Aggregation Framework to find the distribution of products field. Sort the result set by decreasing total number of products. Expected output: [ { _id: 'InvestmentStock', total: 1746 }, { _id: 'CurrencyService', total: 742 }, { _id: 'Brokerage', total: 741 }, { _id: 'InvestmentFund', total: 728 }, { _id: 'Commodity', total: 720 }, { _id: 'Derivatives', total: 706 } ] Which pipeline should you use?
- A. [{ $unwind: { path: "$products" } }, { $group: { _id: "$products", total: { $sum: 1 } } }, { $sort: { total: -1 } }]
- B. [{ $unwind: { path: "products" } }, { $group: { _id: "products", total: { $sum: 1 } } }, { $sort: { total: -1 } }]
- C. [{ $group: { _id: "$products", total: { $sum: 1 } } }, { $sort: { total: -1 } }]
Answer: A
Explanation:
https://docs.mongodb.com/manual/aggregation/
NEW QUESTION # 124
What data structure is used to store the newly created index in MongoDB?
- A. B-tree
- B. Binary Tree
- C. Dictionary
- D. Heap
- E. Graph
Answer: A
Explanation:
https://docs.mongodb.com/manual/indexes/
NEW QUESTION # 125
Select all true statements about query plans in MongoDB. (select 2)
- A. Query plans are cached so that plans don't have to be generated and compared with each other each time a query is executed.
- B. If there are no indexes for the query, the main stage in the query plan will be the COLLSCAN stage.
- C. For a given query, each index in the collection generates at least one query plan.
Answer: A,B
Explanation:
https://docs.mongodb.com/manual/core/query-plans/
NEW QUESTION # 126
......
Updated C100DEV Dumps Questions Are Available For Passing MongoDB Exam: https://actualanswers.pass4surequiz.com/C100DEV-exam-quiz.html