[UPDATED 2024] Read C100DEV Study Guide Cover to Cover as Literally [Q80-Q105]

Share

[UPDATED 2024] Read C100DEV Study Guide Cover to Cover as Literally

100% Real & Accurate C100DEV Questions and Answers with Free and Fast Updates


MongoDB C100DEV (MongoDB Certified Developer Associate) Certification Exam is an industry-recognized certification program designed for developers who work with MongoDB. MongoDB Certified Developer Associate Exam certification is a great way for developers to demonstrate their understanding of MongoDB and its concepts. MongoDB Certified Developer Associate Exam certification exam is based on the MongoDB version 4.4 and is intended for developers with at least six months of experience working with MongoDB.

 

NEW QUESTION # 80
How to shutdown the server? (Mongo shell)

  • A. use admin
  • B. db.disconnect()
  • C. use admin
  • D. db.shutdownServer()
  • E. use admin
  • F. db.shutdown()

Answer: D

Explanation:
https://docs.mongodb.com/manual/reference/method/db.shutdownServer/


NEW QUESTION # 81
Suppose you have a movies collection with the following document structure: { _id: ObjectId("573a1390f29313caabcd60e4"), title: 'The Immigrant', fullplot: "Charlie is on his way to the USA. He wins in a card game, puts the money in Edna's bag (she and her sick mother have been robbed of everything). When he retrieves a little for himself he is accused of being a thief. Edna clears his name. Later, broke, Charlie finds a coin and goes into a restaurant." } You want to sort result set by a relevance score computed by MongoDB in text search query and extract only three documents with the highest score. Which query do you need to use?

  • A. db.movies.find( { $text: { $search: 'spaceship' } }, { score: { $meta: 'textScore' } }, ).sort( { score: { $meta: 'textScore' } } )
  • B. db.movies.find( {}, { score: { $meta: 'textScore' } }, ).sort( { score: { $meta: 'textScore' } } ).limit(3)
  • C. db.movies.find( { $text: { $search: 'spaceship' } }, { score: { $meta: 'textScore' } }, ).sort( { score: { $meta: 'textScore' } } ).limit(3)

Answer: C

Explanation:
https://docs.mongodb.com/manual/text-search/ https://docs.mongodb.com/manual/core/index-text/


NEW QUESTION # 82
A collection called players contains the following documents: [ { _id: 1, user: 'Tom', scores: [ 23, 56, 3, 52, 62 ], bonus: 5 }, { _id: 2, user: 'Jane', scores: [ 42, 50, 10 ], bonus: 3 } ] You want to add additional fields to each document: -> total_score (sum of the scores Array) -> avg_score (average score in scores Array) Expected output: [ { _id: 1, user: 'Tom', scores: [ 23, 56, 3, 52, 62 ], bonus: 5, total_score: 196, avg_score: 39.2 }, { _id: 2, user: 'Jane', scores: [ 42, 50, 10 ], bonus: 3, total_score: 102, avg_score: 34 } ] Which query do you need to use?

  • A. db.players.aggregate([{ $add: { total_score: { $sum: '$scores' }, avg_score: { $avg: '$scores' } } }])
  • B. db.players.aggregate([{ $addFields: { total_score: { $sum: '$scores' }, avg_score: { $avg: '$scores' } } }])
  • C. db.players.aggregate([{ $addFields: { total_score: { $sum: 'scores' }, avg_score: { $avg: 'scores' } } }])

Answer: B

Explanation:
https://docs.mongodb.com/manual/reference/method/db.collection.aggregate/


NEW QUESTION # 83
Suppose you insert the following documents into companies collection: db.companies.insertMany([ {"_id": 1, "name": "Facebook"}, {"_id": 1, "name": "Twitter"}, {"_id": 2, "name": "Tesla"}, {"_id": 3, "name": "Amazon"} ], {"ordered": false}) Select all true statements about this operation. (select 3)

  • A. Three documents will be inserted into the collection.
  • B. One document will be inserted into the collection.
  • C. This insert is unordered.
  • D. MongoDB will insert each document with a unique _id value into the collection.
  • E. Two documents will be inserted into the collection.

Answer: A,C,D

Explanation:
https://docs.mongodb.com/manual/reference/method/db.collection.insertMany/


NEW QUESTION # 84
Use case: e-learning platform Which of the following scenarios is the best candidate to use the Computed Pattern?

  • A. Our app needs to retrieve a course and information about its instructor.
  • B. A course model needs to store references to image of the course that are kept in an external location outside the database.
  • C. Our app needs to retrieve a course and its ten most recent reviews.
  • D. A course model needs to store a counter representing the number of times it was purchased.

Answer: D

Explanation:
https://www.mongodb.com/blog/post/building-with-patterns-the-computed-pattern


NEW QUESTION # 85
You have the following index in a movies collection: { "title": 1, "imdb.rating": -1, "imdb.votes": -1, "type": 1 } Can the following query use the given index for both filtering and sorting?
db.movies.find( { "title": "James Bond", "imdb.rating": { "$gt": 8} } ).sort( { "imdb.rating": 1 } )

  • A. Yes
  • B. No

Answer: A

Explanation:
Yes, although this query does not use equality in the "imdb.rating" field of the index prefix, it does use the same field for sorting. https://docs.mongodb.com/manual/indexes/


NEW QUESTION # 86
Why is MongoDB a NoSQL database?

  • A. Because MongoDB uses a structured way to store and organize data (collections).
  • B. Because MongoDB uses tables, rows and columns to organize data.
  • C. Because MongoDB does not utilize tables, rows and columns to organize data.

Answer: A,C

Explanation:
https://www.mongodb.com/nosql-explained


NEW QUESTION # 87
Which of the following stages do you need to use to randomly select 10 documents from a specific collection?

  • A. { $sample: { size: 10 } }
  • B. { $sample: { get: 10 } }
  • C. { $rand: { size: 10 } }
  • D. { $sampleRate: { size: 10 } }

Answer: A

Explanation:
https://docs.mongodb.com/manual/reference/operator/aggregation/sample/


NEW QUESTION # 88
What is the built-in database called config in MongoDB for?

  • A. The config database plays an important role in the authentication and authorization process. Certain actions performed by administrators also require access to this database.
  • B. The config database stores data describing the MongoDB server. For replica sets, it also stores information about the replication process.
  • C. The config database is used to store information about shards in shared MongoDB cluster.

Answer: C

Explanation:
https://docs.mongodb.com/manual/reference/config-database/


NEW QUESTION # 89
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 # 90
How does the document relate to the collection in MongoDB? Check all that apply.

  • A. Collections are tables of documents.
  • B. Documents consist of collections.
  • C. Collections consists of one or many documents.
  • D. Documents are organized into collections.

Answer: C,D

Explanation:
Explanation: https://docs.mongodb.com/manual/core/databases-and-collections/


NEW QUESTION # 91
How can we present the basic syntax for aggregation in MongoDB?

  • A. db.myCollection.aggregate([ { stage1 }, { stage2 }, ..., { stageN } ], { options } )
  • B. db.myCollection.aggregate([ { stage1 }, { stage2 }, ..., { stageN }, { options } ])
  • C. db.myCollection.aggregate([ { options } { stage1 }, { stage2 }, ..., { stageN } ])

Answer: A

Explanation:
https://docs.mongodb.com/manual/aggregation/


NEW QUESTION # 92
What is the best practice in using the $match operator?

  • A. The earlier in the pipeline, the better. Not only because we will be using expression filters which reduce the number of documents to be processed, but also because we can use indexes.
  • B. The later in the pipeline, the better.
  • C. It doesn't matter when we apply $match stage.

Answer: A

Explanation:
https://docs.mongodb.com/manual/reference/operator/aggregation/match/


NEW QUESTION # 93
What command can you use to create a capped collection named latest_news that will be limited to 3 documents and 10,000 bytes?

  • A. db.createCollection('latest_news', {'capped': true, 'size': 10000, 'max': 3})
  • B. db.createCollection('latest_news', {'capped': true, 'max': 3})
  • C. db.createCollection('latest_news', {'size': 10000, 'max': 3})

Answer: A

Explanation:
https://docs.mongodb.com/manual/core/capped-collections/


NEW QUESTION # 94
$group stage can be used multiple times within an aggregation pipeline.

  • A. True
  • B. False

Answer: A

Explanation:
https://docs.mongodb.com/manual/reference/operator/aggregation/group/


NEW QUESTION # 95
Suppose we have database with the following collections: db.users.insertMany([ { _id: 1, user_name: 'karo243', account_id: 1010 }, { _id: 2, user_name: 'jano23', account_id: 3213 }, { _id: 3, user_name: 'fac_data', account_id: 4336 } ]) db.accounts.insertMany([ { account_id: 1010, type: 'investment', limit: 1000000 }, { account_id: 4336, type: 'derivatives', limit: 100000 } ]) We want to perform so-called left join. To the users collection join account details from accounts collection based on account_id field. See below. Expected output: [ { _id: 1, user_name: 'karo243', account_id: 1010, account_details: [ { _id: ObjectId("61af47c6e29861661d063714"), account_id: 1010, type: 'investment', limit: 1000000 } ] }, { _id: 2, user_name: 'jano23', account_id: 3213, account_details: [] }, { _id: 3, user_name: 'fac_data', account_id: 4336, account_details: [ { _id: ObjectId("61af47c6e29861661d063715"), account_id: 4336, type: 'derivatives', limit: 100000 } ] } ]
Which query do you need to use?

  • A. db.accounts.aggregate([ { $lookup: { from: 'accounts', localField: 'account_id', foreignField: 'account_id', as: 'account_details' } } ])
  • B. db.users.aggregate([ { $lookup: { from: 'accounts', as: 'account_details' } } ])
  • C. db.users.aggregate([ { $lookup: { from: 'accounts', localField: 'account_id', foreignField: 'account_id', as: 'account_details' } } ])
  • D. db.users.aggregate([ { $lookup: { from: 'accounts', localField: 'account_id', foreignField: 'account_id' } } ])

Answer: C

Explanation:
https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/


NEW QUESTION # 96
What is MongoDB Compass?

  • A. Special data type in MongoDB to store geospatial data.
  • B. A map-based chart type that is available with MongoDB Charts.
  • C. It is a GUI for MongoDB.

Answer: C

Explanation:
https://docs.mongodb.com/compass/current/


NEW QUESTION # 97
What does IOPS stand for in database terminology?

  • A. Internet Official Protocol Standards
  • B. Input/Output per Second

Answer: B


NEW QUESTION # 98
Select true statements about the naming convention of collections in MongoDB.

  • A. Empty string '' cannot be a collection name.
  • B. Collection names should not contain $ sign.
  • C. Don't create collections that start with system.

Answer: A,B,C


NEW QUESTION # 99
Select all true statement regarding to the MongoDB (BSON, JSON). (select 3)

  • A. MongoDB stores data in BSON, and we can view it in JSON.
  • B. BSON is faster to parse and lighter to store than JSON.
  • C. BSON supports as many data types as JSON.
  • D. MongoDB stores data in JSON, and we can view it in BSON.
  • E. BSON supports more data types than JSON.

Answer: A,B,E

Explanation:
https://www.mongodb.com/json-and-bson


NEW QUESTION # 100
It's very important to picking a good shard key. If we don't choose a good shard key, then we won't be able to see the benefits of horizontal scaling.

  • A. True
  • B. False

Answer: A

Explanation:
https://docs.mongodb.com/manual/core/sharding-shard-key/


NEW QUESTION # 101
Suppose we have a products collection with the following fields and values: _id (automatically created ObjectId) product_code (unique values for each product) color (as String values) size (this field is missing for some products) origin_country Which of these fields would be the best shard key?

  • A. size
  • B. origin_country
  • C. color
  • D. product_code
  • E. _id

Answer: D

Explanation:
With color, size, and origin_country we run the risk of low cardinality. The _id wouldn't make a good shard key because it isn't something meaningful we could query the database. https://docs.mongodb.com/manual/core/sharding-shard-key/


NEW QUESTION # 102
Which cursor method should you use to specify the maximum number of documents returned?

  • A. cursor.hint()
  • B. cursor.map()
  • C. cursor.count()
  • D. cursor.skip()
  • E. cursor.limit()

Answer: E

Explanation:
https://docs.mongodb.com/manual/reference/method/cursor.limit/


NEW QUESTION # 103
Which of the following documents are valid JSON format? (select 2)

  • A. {_id: 1, name: "Riviera Caterer", cuisine: "American"}
  • B. ["_id": 1, "name": "Riviera Caterer", "cuisine": "American"]
  • C. {"_id": 1, "name": "Riviera Caterer", "cuisine": "American"}
  • D. {"_id": 1, "address": {"street": "Stillwell Avenue", "zipcode": "11224"}}
  • E. <"_id": 1, "name": "Riviera Caterer", "cuisine": "American">

Answer: C,D

Explanation:
While some software may not throw an error, this is still not valid JSON because each field name should be in quotes: {_id: 1, name: "Riviera Caterer", cuisine: "American"} Square brackets instead of curly ones: ["_id": 1, "name": "Riviera Caterer", "cuisine": "American"] The rest of the examples are self-evident. https://www.mongodb.com/json-and-bson


NEW QUESTION # 104
Suppose you are connected to mongod instance that is already running on port 27000 as admin user. You have to create a new user for an application that has the readWrite role. Use the db.createUser() command to create a user for data analysis. The requirements for this user are: -> role: read on esmartdata database -> username: dataScientist -> password: ds123sci456 Which command should you use?

  • A. db.createUser({ user: 'dataScientist', pwd: 'ds123sci456', roles: [{role: 'read', db: ''}] })
  • B. db.createUser({ user: 'dataScientist', pwd: 'ds123sci456', roles: [{role: 'read', db: 'esmartdata'}] })
  • C. db.createUser({ user: 'dataScientist', pwd: 'ds123sci456', roles: [{role: 'r', db: 'esmartdata'}] })
  • D. db.createUser({ user: 'dataScientist', pwd: 'ds123sci456', roles: [{role: 'write', db: 'esmartdata'}] })

Answer: B

Explanation:
https://docs.mongodb.com/manual/reference/method/db.createUser/


NEW QUESTION # 105
......


What is the salary of a MongoDB C100DEV Certified Professional?

The Average salary of different countries of MongoDB C100DEV Certified professional

  • India - INR 5,60,000

  • United States - USD 96,000

  • UK - Pounds 60,000

 

Reliable Study Materials for C100DEV Exam Success For Sure: https://skillmeup.examprepaway.com/MongoDB/braindumps.C100DEV.ete.file.html