0% found this document useful (0 votes)
237 views

C 100 Dev

The document provides sample questions and answers for the C100DEV MongoDB Certified Developer Associate exam. It includes 15 multiple choice practice questions related to topics like indexing, sharding, aggregation, and replication. Each question is accompanied by an explanation linking to relevant MongoDB documentation.

Uploaded by

Mai Phuong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
237 views

C 100 Dev

The document provides sample questions and answers for the C100DEV MongoDB Certified Developer Associate exam. It includes 15 multiple choice practice questions related to topics like indexing, sharding, aggregation, and replication. Each question is accompanied by an explanation linking to relevant MongoDB documentation.

Uploaded by

Mai Phuong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Exam4Tests

http://www.exam4tests.com
Latest exam questions & answers help you to pass IT exam test easily
Valid C100DEV exam dumps ensure you a high C100DEV passing rate
IT Certification Guaranteed, The Easy Way!

Exam : C100DEV

Title : MongoDB Certified Developer


Associate Exam

Vendor : MongoDB

Version : DEMO

C100DEV exam test, MongoDB C100DEV exam dumps, 1 C100DEV real exam
https://www.exam4tests.com/C100DEV-valid-braindumps.html
Valid C100DEV exam dumps ensure you a high C100DEV passing rate
IT Certification Guaranteed, The Easy Way!

NO.1 Select true statements about sorting & indexing performance.


A. Index prefixes cannot be used in query predicates to increase index utilization.
B. Index prefixes can be used in sort predicates to prevent sort in memory.
C. It's possible to have a sorted query use an index for both sorting and filtering.
D. Indexes can be traversed both forward and backward.
Answer: B,C,D
Explanation:
https://docs.mongodb.com/manual/tutorial/sort-results-with-indexes/

NO.2 Select true statements about the selection of the shard key.
A. High frequency - most documents fall within a particular range. This can lead to bottleneck
problems within the cluster.
B. High cardinality provides more shard key values, which determines the maximum number of
chunks the balancer can create.
C. Non-monotonic data is a good choice for shard key.
D. Monotonically changing shard keys result in write operations going to a single shard. This is
inefficient.
Answer: A,B,C,D
Explanation:
https://docs.mongodb.com/manual/core/sharding-shard-key/

NO.3 Why is MongoDB a NoSQL database?


A. Because MongoDB does not utilize tables, rows and columns to organize data.
B. Because MongoDB uses tables, rows and columns to organize data.
C. Because MongoDB uses a structured way to store and organize data (collections).
Answer: A,C
Explanation:
https://www.mongodb.com/nosql-explained

NO.4 You have a companies collection with the following document structure: { _id:
ObjectId('52cdef7c4bab8bd675297dac'), name: 'Veoh', homepage_url: 'http://www.veoh.com',
category_code: 'games_video', number_of_employees: null, founded_year: 2004, tag_list: 'veoh,
video, veohtv, socialvideo, videosharing, crunchbase, inuyasha', email_address: 'pr@veoh.com',
description: 'Internet TV service' } How can you use projection to extract all documents with the
following fields: name, homepage_url, tag_list?
A. db.companies.find( { _id: 0, name: 1, homepage_url: 1, tag_list: 1 } )
B. db.companies.find( {}, { _id: 0, name: 1, homepage_url: 1, tag_list: 1 } )
C. db.companies.find( {}, { name: 1, homepage_url: 1, tag_list: 1 } )
D. db.companies.find( {}, { _id: 1, name: 1, homepage_url: 1, tag_list: 1 } )
Answer: C
Explanation: https://docs.mongodb.com/manual/reference/method/db.collection.find/

NO.5 You have to launch a replica set with three members. For the first node you have the following
mongo1.conf configuration file: storage: dbPath: /var/mongodb/db/1 net: bindIp: localhost port:

C100DEV exam test, MongoDB C100DEV exam dumps, 2 C100DEV real exam
https://www.exam4tests.com/C100DEV-valid-braindumps.html
Valid C100DEV exam dumps ensure you a high C100DEV passing rate
IT Certification Guaranteed, The Easy Way!

27000 security: authorization: enabled systemLog: destination: file path:


/var/mongodb/logs/mongod1.log logAppend: true processManagement: fork: true Update this
configuration file so that this mongod instance: -> authenticates internally using the keyfile
/var/mongodb/pki/keyfile -> belongs to the replica set repl-set-1 Which of the following
configuration file should you choose?
A. systemLog:
destination: file
path: /var/mongodb/logs/mongod1.log
logAppend: true
processManagement:
fork: true
repl:
replSetName: repl-set-1
B. storage:
dbPath: /var/mongodb/db/1
fork: true
replication:
replSetName: repl-set-1
C. storage:
dbPath: /var/mongodb/db/1
net:
bindIp: localhost
port: 27000
security:
authorization: enabled
Answer: A
Explanation:
https://docs.mongodb.com/manual/reference/configuration-options/

NO.6 Use case: e-learning platform Which of the following scenarios is the best candidate to use the
Subset Pattern?
A. A course model needs to store references to image of the course that are kept in an external
location outside the database.
B. Our app needs to retrieve a course and its ten most recent reviews.
C. A course model needs to store a counter representing the number of times it was purchased.
D. Our app needs to retrieve a course and information about its instructor.
Answer: B
Explanation:
https://www.mongodb.com/blog/post/building-with-patterns-the-subset-pattern

NO.7 Assign typical operational tasks to the Data Scientist.


A. write data
B. write data, read data
C. read data
D. create user, create index

C100DEV exam test, MongoDB C100DEV exam dumps, 3 C100DEV real exam
https://www.exam4tests.com/C100DEV-valid-braindumps.html
Valid C100DEV exam dumps ensure you a high C100DEV passing rate
IT Certification Guaranteed, The Easy Way!

Answer: C

NO.8 Can you perform the following operation?


db.users.insertOne({})
A. Yes, it will only insert a document with an _id field (auto-generated).
B. No, it will throw an error.
C. Yes, it will only insert a document without any fields.
Answer: A

NO.9 Which of the following actions are granted to the built-in readWrite role?
A. find
B. insert
C. update
D. remove
Answer: A,B,C,D
Explanation:
https://docs.mongodb.com/manual/reference/built-in-roles/#mongodb-authrole-readWrite

NO.10 In your database a movies collection is given 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 return all movies that are in the Fantasy and
Drama (both) genre?
A. db.movies.find( { genres: { $in: ['Fantasy', 'Drama'] } } )
B. db.movies.find( { genres: { $elemMatch: ['Fantasy', 'Drama'] } } )
C. db.movies.find( { genres: { $all: ['Fantasy', 'Drama'] } } )
D. db.movies.find( { genres: { $size: ['Fantasy', 'Drama'] } } )
Answer: C
Explanation:
https://docs.mongodb.com/manual/reference/operator/query/all/

NO.11 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" } ).sort( { "imdb.rating": 1, "imdb.votes": 1 } )
A. No
B. Yes
Answer: A
Explanation:
Yes, this query matches the equality in the query predicate with the index prefix and continues the
prefix in the sort predicate moving the index backwards.
https://docs.mongodb.com/manual/indexes/

NO.12 You have the following replica set configuration: conf = { "_id": "replset", "version": 1,

C100DEV exam test, MongoDB C100DEV exam dumps, 4 C100DEV real exam
https://www.exam4tests.com/C100DEV-valid-braindumps.html
Valid C100DEV exam dumps ensure you a high C100DEV passing rate
IT Certification Guaranteed, The Easy Way!

"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": 1, "host":
"192.168.120.24:27019", "priority": 1, "votes": 1 } ] } Select all true statements about this
configuration.
A. This configuration is incorrect. Host information must be unique for each member in a replica set.
B. This configuration is incorrect. _id field must be unique for each member in a replica set.
C. This configuration is correct.
D. This configuration is incorrect. You can only specify a priority of 0 or 1.
Answer: B
Explanation:
https://docs.mongodb.com/manual/replication/#replication

NO.13 Which cursor method should you use to return the number of documents in the result set?
A. cursor.count()
B. cursor.explain()
C. cursor.total()
D. cursor.sum()
Answer: A
Explanation:
https://docs.mongodb.com/manual/reference/method/db.collection.count/

NO.14 What is the built-in database called local in MongoDB for?


A. The local database stores data describing the MongoDB server. For replica sets, it also stores
information about the replication process.
B. The local database is used to store information about shards in shared MongoDB cluster.
C. The local database plays an important role in the authentication and authorization process.
Certain actions performed by administrators also require access to this database.
Answer: A
Explanation:
https://docs.mongodb.com/manual/reference/local-database/

NO.15 Select all true statements regarding to multikey indexes.


A. An index doesn't become multikey until a document that has an array value is inserted.
B. Multikey indexes allow us to index on array fields.
C. Multikey indexes don't support indexes on multiple array fields on single documents.
Answer: A,B,C
Explanation:
https://docs.mongodb.com/manual/core/index-multikey/

NO.16 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: B

C100DEV exam test, MongoDB C100DEV exam dumps, 5 C100DEV real exam
https://www.exam4tests.com/C100DEV-valid-braindumps.html
Valid C100DEV exam dumps ensure you a high C100DEV passing rate
IT Certification Guaranteed, The Easy Way!

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

NO.17 Select all true statements regarding to replica sets in MongoDB.


A. Replica set members have a fixed role assigned.
B. We can have up to 50 replica set members, but only 7 of those will be voting members.
C. Replica sets use failover to provide high availability to client applications.
Answer: B,C
Explanation:
Replica set members have a fixed role assigned. -> False The availability of the system will be ensured
by failing over the role of primary to an available secondary node through an election.
https://docs.mongodb.com/manual/replication/

NO.18 How to correctly create a date (new object of Date type) in MongoDB?
A. new Date()
B. db.Date()
C. Date()
Answer: A
Explanation:
https://docs.mongodb.com/manual/reference/method/Date/

NO.19 Which collection method can you use to build the index?
A. db.collection.createIndex()
B. db.collection.create()
C. db.collection.insert()
D. db.collection.getIndexes()
Answer: A
Explanation:
https://docs.mongodb.com/manual/reference/method/db.collection.createIndex/

NO.20 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.users.aggregate([ { $lookup: { from: 'accounts', as: 'account_details' } } ])
B. db.users.aggregate([ { $lookup: { from: 'accounts', localField: 'account_id', foreignField:
'account_id', as: 'account_details' } } ])

C100DEV exam test, MongoDB C100DEV exam dumps, 6 C100DEV real exam
https://www.exam4tests.com/C100DEV-valid-braindumps.html
Valid C100DEV exam dumps ensure you a high C100DEV passing rate
IT Certification Guaranteed, The Easy Way!

C. db.users.aggregate([ { $lookup: { from: 'accounts', localField: 'account_id', foreignField:


'account_id' } } ])
D. db.accounts.aggregate([ { $lookup: { from: 'accounts', localField: 'account_id', foreignField:
'account_id', as: 'account_details' } } ])
Answer: B
Explanation:
https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/

NO.21 Select all true statements regarding to the _id field in MongoDB documents. (select 4)
A. We can select a non ObjectId type value for _id field when inserting a new document.
B. When inserting a document, the _id value is already generated as an ObjectId type, if not directly
specified.
C. The _id values must be unique for the collection.
D. MongoDB adds an _id field to any inserted document if it doesn't have one.
E. The _id can be an array data type.
Answer: A,B,C,D
Explanation:
https://docs.mongodb.com/manual/core/document/
https://docs.mongodb.com/manual/reference/method/ObjectId/

NO.22 There is a gamers collection in your database with the following document structure: { _id: 1,
level: 15, is_active: true }, { _id: 2, level: 14, is_active: true }, { _id: 3, level: 7, is_active: false } How do
you increase the value of the level field by 20 for a player with id = 3?
Expected result:
{ _id: 1, level: 15, is_active: true }, { _id: 2, level: 14, is_active: true }, { _id: 3, level: 27, is_active: false
}
A. db.gamers.update( { _id: 3 }, { $unset: { level: 20 } } )
B. db.gamers.update( { _id: 3 }, { $inc: { level: 20 } } )
C. db.gamers.update( { _id: 3 }, { $set: { level: 20 } } )
Answer: B
Explanation:
https://docs.mongodb.com/manual/reference/operator/update/inc/

NO.23 Select true statements about data modeling in MongoDB.


A. It's good data modeling practice to directly map each table from the relational model (normalized
data) to the collection.
B. To avoid having to join data in the application layer from different collections you can denormalize
your data.
C. If one of your application's main queries is to retrieve related information from different
collections, it is usually better to group that information into a single document.
Answer: B,C
Explanation:
https://docs.mongodb.com/manual/core/data-modeling-introduction/

C100DEV exam test, MongoDB C100DEV exam dumps, 7 C100DEV real exam
https://www.exam4tests.com/C100DEV-valid-braindumps.html
Valid C100DEV exam dumps ensure you a high C100DEV passing rate
IT Certification Guaranteed, The Easy Way!

NO.24 Given a movies collection where each document has the following structure: { _id:
ObjectId("573a1390f29313caabcd60e4"), genres: [ 'Short', 'Comedy', 'Drama' ], title: 'The Immigrant',
year: 1917, imdb: { rating: 7.8, votes: 4680, id: 8133 }, countries: [ 'USA' ] } This time we are using the
Aggregation Framework to search our database. Which of the following queries will find all movies
with a rating greater than 8?
A. db.movies.aggregate([ { $match: { imdb.rating: { $gt: 8 } } } ])
B. db.movies.aggregate([ { $match: { "imdb.rating": { $gt: 8 } } } ])
C. db.movies.aggregate([ { $match: { "imdb.rating": { $gte: 8 } } } ])
Answer: B
Explanation:
db.movies.aggregate([ { $match: { imdb.rating: { $gt: 8 } } } ]) This is incorrect because we need to use
quotes in this case. db.movies.aggregate([ { $match: { "imdb.rating": { $gte: 8 } } } ]) This is incorrect
because $gte also checks for equality.
https://docs.mongodb.com/manual/reference/method/db.collection.aggregate/

NO.25 Suppose you have an accounts collection with the following document structure: { _id:
ObjectId("61af47c6e29861661d063714"), account_id: 1010, type: 'investment', limit: 1000000 }, {
_id: ObjectId("61af47c6e29861661d063715"), account_id: 4336, type: 'derivatives', limit: 100000 }, {
_id: ObjectId("61af47c6e29861661d063716"), account_id: 4336, type: 'commodity', limit: 1000 }
Which of the following documents would be modified by this update? db.accounts.updateMany( {
"type": "investment" }, { "$set": { "limit": 2000000 } } )
A. { _id: ObjectId("61b1bde1ceb6f770f56b0cd9"), account_id: 4915, type: 'investment', limit:
1000000 }
B. { _id: ObjectId("61af47c6e29861661d067825"), account_id: 7355, type: 'commodity', limit: 500000
}
C. { _id: ObjectId("61af47c6e29861661d063714"), account_id: 1010, type: 'investment', limit:
1000000 }
D. { _id: ObjectId("61af47c6e29861661d063715"), account_id: 4336, type: 'derivatives', limit: 100000
}
Answer: A,C
Explanation:
https://docs.mongodb.com/manual/reference/method/db.collection.updateMany/

NO.26 Which collection method do you need to use to drop a specific collection?
A. db.collection.drop()
B. db.collection.dropIndex()
C. db.collection.remove()
D. db.collection.dropCollection()
Answer: A
Explanation:
https://docs.mongodb.com/manual/reference/method/db.collection.drop/

NO.27 Complete the sentence below.


A. have an _id index.

C100DEV exam test, MongoDB C100DEV exam dumps, 8 C100DEV real exam
https://www.exam4tests.com/C100DEV-valid-braindumps.html
Valid C100DEV exam dumps ensure you a high C100DEV passing rate
IT Certification Guaranteed, The Easy Way!

B. have no index.
C. have an field_id index.
D. By default, all MongoDB user-created collections...
Answer: A
Explanation:
https://docs.mongodb.com/manual/core/document/
https://docs.mongodb.com/manual/reference/method/ObjectId/

NO.28 Suppose you insert the following documents into a companies collection:
db.companies.insertMany([ {"name": "Facebook"}, {"name": "Twitter"} ])
Select all true statements about this command. (select 3)
A. This command will insert two documents into the collection.
B. MongoDB will automatically create an _id field for each document and it will be unique.
C. This command will insert one document into the collection.
D. The _id field is not specified in any of these documents.
Answer: A,B,D
Explanation:
https://docs.mongodb.com/manual/reference/method/db.collection.insertMany/

NO.29 We can use REGEX in our queries in MongoDB - JavaScript regular expression syntax.
A. False
B. True
Answer: B
Explanation:
https://docs.mongodb.com/manual/reference/operator/query/regex/

NO.30 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( {}, { score: { $meta: 'textScore' } }, ).sort( { score: { $meta: 'textScore' } } ).limit(3)
B. db.movies.find( { $text: { $search: 'spaceship' } }, { score: { $meta: 'textScore' } }, ).sort( { score: {
$meta: 'textScore' } } ).limit(3)
C. db.movies.find( { $text: { $search: 'spaceship' } }, { score: { $meta: 'textScore' } }, ).sort( { score: {
$meta: 'textScore' } } )
Answer: B
Explanation:
https://docs.mongodb.com/manual/text-search/ https://docs.mongodb.com/manual/core/index-
text/

C100DEV exam test, MongoDB C100DEV exam dumps, 9 C100DEV real exam
https://www.exam4tests.com/C100DEV-valid-braindumps.html

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy