
Get Aug-2023 Dumps to Pass your C100DEV Exam with 100% Real Questions and Answers
Updated Exam C100DEV Dumps with New Questions
NEW QUESTION # 124
Suppose you have a developers collection with the following document structure: { _id: 1, fname: 'Bob', lname: 'Smith', tech_stack: [ 'git', 'c++', 'sqlite', 'linux' ] } Select a query that can be executed without errors.
- A. db.developers.updateOne( { _id: 1 }, { $set: { fname: 'John' } } )
- B. db.developers.updateOne( { _id: 1 }, { $set: { _id: 3, fname: 'Bob' } } )
- C. db.developers.updateOne( { _id: 1 }, { $unset: { _id: '' } } )
- D. db.developers.updateOne( { _id: 1 }, { $set: { _id: 3 } } )
Answer: A
Explanation:
https://docs.mongodb.com/manual/reference/method/db.collection.updateOne/
NEW QUESTION # 125
Consider the following command: $ mongod --dbpath /data/db --logpath /data/logs --replSet REPL1 --bind_ip '127.0.0.1,192.168.168.84' -- keyFile /data/keyfile --fork Which of the following configuration files is equivalent to the specified command?
- A. storage dbPath="/data/db" systemLog destination=file path="/data/logs" replication replSetName="REPL1" net bindIp="127.0.0.1,192.168.168.84" security keyFile="/data/keyfile" processManagement fork=true
- B. storage: dbPath: "/data/db" systemLog: destination: file path: "/data/logs" replication: replSetName: "REPL1" net: bindIp: "127.0.0.1,192.168.168.84" processManagement: fork: true
- C. storage: dbPath: "/data/db" systemLog: destination: file path: "/data/logs" net: bindIp: "127.0.0.1,192.168.168.84" security: keyFile: "/data/keyfile" processManagement: fork: true
- D. storage: dbPath: "/data/db" systemLog: destination: file path: "/data/logs" replication: replSetName: "REPL1" net: bindIp: "127.0.0.1,192.168.168.84" security: keyFile: "/data/keyfile" processManagement: fork: true
Answer: D
Explanation:
https://docs.mongodb.com/manual/reference/configuration-options/
NEW QUESTION # 126
Suppose you added the following index to a products collection: { product_category: 1 } Which of the following operations can potentially decrease performance?
- A. db.products.find( { product_category: 'clothes' } )
- B. db.products.insertOne( { product_category: 'clothes' } )
- C. db.products.updateOne( { product_category: 'shoes' }, { $set: company: 'Nike' } )
Answer: B,C
Explanation:
The updateOne and insertOne operations are correct because adding indexes affects write performance.
NEW QUESTION # 127
Which collection method can you use to build the index?
- A. db.collection.insert()
- B. db.collection.createIndex()
- C. db.collection.create()
- D. db.collection.getIndexes()
Answer: B
Explanation:
https://docs.mongodb.com/manual/reference/method/db.collection.createIndex/
NEW QUESTION # 128
Select read concern levels that are supported by transactions in MongoDB.
- A. majority
- B. snapshot
- C. local
Answer: A,B,C
Explanation:
https://docs.mongodb.com/manual/core/transactions/#read-concern-write-concern-read-preference
NEW QUESTION # 129
Suppose you have a sales collection with the following document structure: { _id: ObjectId("5bd761dcae323e45a93ccfe8"), saleDate: ISODate("2015-03-23T21:06:49.506Z"), items: [ { name: 'printer paper', tags: [ 'office', 'stationary' ], price: Decimal128("40.01"), quantity: 2 } { name: 'pens', tags: [ 'writing', 'office', 'school', 'stationary' ], price: Decimal128("56.12"), quantity: 5 }, { name: 'notepad', tags: [ 'office', 'writing', 'school' ], price: Decimal128("18.47"), quantity: 2 } ], storeLocation: 'Denver', couponUsed: true, purchaseMethod: 'Online' } Which operator should you use to extract all sales documents that have 'notepad' name in items field?
- A. $all
- B. $nin
- C. $elemMatch
- D. $in
- E. $match
Answer: C
Explanation:
https://docs.mongodb.com/manual/reference/operator/query/elemMatch/
NEW QUESTION # 130
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 # 131
What does it command do in the mongo shell?
- A. Iterates through the cursor results.
- B. it is not a mongo shell command.
- C. Displays cluster statistics.
- D. Terminates the current query execution.
Answer: A
NEW QUESTION # 132
Use case: e-learning platform Which of the following scenarios is the best candidate to use the Computed 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 information about its instructor.
- 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 # 133
Where is collection metadata stored in a sharded cluster?
- A. On the configuration servers.
- B. In a random shard.
- C. In the primary shard.
Answer: A
Explanation:
https://docs.mongodb.com/manual/sharding/
NEW QUESTION # 134
Which of the following operations can be used to access the logs? (Mongo shell)
- A. Running db.getLogComponents() from the Mongo shell.
- B. Running db.getLog() from the Mongo shell.
- C. Running db.adminCommand({ "getLog": "global" }) from the Mongo shell.
Answer: C
Explanation:
https://docs.mongodb.com/manual/reference/method/db.adminCommand/
NEW QUESTION # 135
Given the following example document from an artists collection: { _id: 5, last_name: 'Maurer', first_name: 'Alfred', year_born: 1868, year_died: 1932, nationality: 'USA' } and the following index: db.artists.createIndex( { "last_name": 1, "nationality": 1 } ) How MongoDB will handle the query below?
db.artists.find( { "last_name": /^B./, "nationality": 'France' } )
- A. None of these.
- B. As an index scan.
- C. As a collection scan.
Answer: B
Explanation:
https://docs.mongodb.com/manual/indexes/
NEW QUESTION # 136
Select all default configurations for mongod.
- A. By default, mongod doesn't enforce authentication.
- B. By default, mongod is only bound to localhost (or 127.0.0.1).
- C. The default port for mongod is 27017.
- D. The default data directory for mongod is /data/db
Answer: A,B,C,D
Explanation:
https://docs.mongodb.com/manual/reference/configuration-options/
NEW QUESTION # 137
Select properly used $out operator.
- A. db.collection.aggregate([ { $out: "new_collection" }, { stage1 }, { stage2 }, ..., { $stageN } ])
- B. db.collection.aggregate([ { stage1 }, { stage2 }, ..., { stageN }, { $out: "new_collection" } ])
- C. db.collection.aggregate([ { stage1 }, { $out: "new_collection" }, { stage2 }, ..., { stageN } ])
Answer: B
Explanation:
https://docs.mongodb.com/manual/reference/operator/aggregation/out/
NEW QUESTION # 138
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 Example output: { title: 'Miss Lulu Bett', genres: [ 'Comedy', 'Drama' ], imdb: { votes: 204 } } Which pipeline should you use?
- A. [{ $match: { genres: { $in: ['Drama'] } } }, { $project: { _id: 0, title: 1, genres: 1, 'imdb.votes': 1 } }]
- B. [{ $project: { _id: 0, title: 1, genres: 1, 'imdb.votes': 1 } }]
- C. [{ $match: { genres: { $nin: ['Drama'] }, 'imdb.votes': { $gte: 100 } } }]
- D. [{ $match: { genres: { $in: ['Drama'] }, 'imdb.votes': { $gte: 100 } } }, { $project: { _id: 0, title: 1, genres: 1, 'imdb.votes': 1 } }]
Answer: D
Explanation:
https://docs.mongodb.com/manual/reference/method/db.collection.aggregate/
NEW QUESTION # 139
There are some special databases in MongoDB that we cannot use to create a new database. Select those names.
- A. apps
- B. admin
- C. config
- D. local
- E. users
Answer: B,C,D
Explanation:
https://docs.mongodb.com/manual/reference/local-database/ https://docs.mongodb.com/manual/tutorial/manage-users-and-roles/ https://docs.mongodb.com/manual/reference/config-database/
NEW QUESTION # 140
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 correct.
- C. This configuration is incorrect. You can only specify a priority of 0 or 1.
- D. This configuration is incorrect. Host information must be unique for each member in a replica set.
Answer: D
Explanation:
https://docs.mongodb.com/manual/replication/#replication
NEW QUESTION # 141
......
100% Pass Guarantee for C100DEV Exam Dumps with Actual Exam Questions: https://pass4sure.examtorrent.com/C100DEV-prep4sure-dumps.html
