This page was exported from IT Certification Exam Braindumps [ http://blog.braindumpsit.com ] Export date:Wed Apr 16 22:07:57 2025 / +0000 GMT ___________________________________________________ Title: [Q12-Q34] C100DEV Certification - The Ultimate Guide [Updated 2023] --------------------------------------------------- C100DEV Certification - The Ultimate Guide [Updated 2023] C100DEV Practice Exam and Study Guides - Verified By BraindumpsIT MongoDB C100DEV Exam is a computer-based test that consists of multiple-choice questions. C100DEV exam is timed, and candidates are given a maximum of 90 minutes to complete it. C100DEV exam is available in English and can be taken at any of the Pearson VUE testing centers worldwide. Candidates who pass the exam will earn the MongoDB Certified Developer Associate Certification and a digital badge that can be displayed on their resume or LinkedIn profile. MongoDB C100DEV certification is an industry-recognized certification that validates the skills and knowledge of developers who work with MongoDB. It is designed for developers who want to demonstrate their proficiency in building applications using MongoDB. MongoDB Certified Developer Associate Exam certification exam covers a wide range of topics, including data modeling, indexing, aggregation, and application development with MongoDB.   Q12. Select all true statements regarding to Aggregation Framework.  The Aggregation Framework will automatically reorder stages in a certain conditions (for optimization).  The query in a $match stage can not be entirely covered by an index. https://docs.mongodb.com/manual/aggregation/Q13. Which of the following commands will add a collection that is stored in JSON file to a MongoDB cluster?  mongodump  mongoimport  mongostore  mongoexport https://docs.mongodb.com/database-tools/mongoimport/Q14. Select all true statements regarding to replica sets in MongoDB.  We can have up to 50 replica set members, but only 7 of those will be voting members.  Replica set members have a fixed role assigned.  Replica sets use failover to provide high availability to client applications. 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/Q15. What is MongoDB Charts?  MongoDB product that helps you visualize data stored in an Atlas cluster.  A feature that displays data about the performance of your Atlas cluster.  An application that allows you to embed on your website visualizations that are created in other applications. https://docs.mongodb.com/charts/Q16. Which of the following commands can you use to exports data in BSON format from a MongoDB cluster?  mongodump  mongoexport  mongostore  mongoimport https://docs.mongodb.com/database-tools/mongodump/Q17. Suppose you are connected to mongod instance that is already running on port 27000 as admin user. You have to dump reviews collection from the restaurants database to BSON file. Which command should you use?  mongodump –db restaurants –collection reviews  mongodump –db reviews –collection restaurants  mongoexport –db restaurants –collection reviews https://docs.mongodb.com/database-tools/mongodump/Q18. What can you deduce from the explain() method?For example:db.collection.find().explain()  All stages that the query must go through with details about the time it takes, number of documents processed and returned to the next stage in the pipeline.  All available indexes for this collection.  The index used by the chosen plan.  Whether the sort stage was performed by index or performed in memory. https://docs.mongodb.com/manual/reference/method/cursor.explain/Q19. What is a document in MongoDB?  It’s an ordered collection of keys (fields) with assigned values. The keys in each document are strings of characters. Documents in MongoDB cannot contain duplicate keys.  It’s a text file containing the configuration of the MongoDB instance.  It’s a table that contains information about all collections in the database. Q20. 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 } } )  { _id: ObjectId(“61af47c6e29861661d063715”), account_id: 4336, type: ‘derivatives’, limit: 100000 }  { _id: ObjectId(“61b1bde1ceb6f770f56b0cd9”), account_id: 4915, type: ‘investment’, limit: 1000000 }  { _id: ObjectId(“61af47c6e29861661d067825”), account_id: 7355, type: ‘commodity’, limit: 500000 }  { _id: ObjectId(“61af47c6e29861661d063714”), account_id: 1010, type: ‘investment’, limit: 1000000 } https://docs.mongodb.com/manual/reference/method/db.collection.updateMany/Q21. How many indexes will the following command create?db.products.createIndex( { product_name: 1, product_category: -1 } )  0  3  1  2 https://docs.mongodb.com/manual/reference/method/db.collection.createIndex/Q22. 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?  db.movies.find( { genres: { $elemMatch: [‘Fantasy’, ‘Drama’] } } )  db.movies.find( { genres: { $in: [‘Fantasy’, ‘Drama’] } } )  db.movies.find( { genres: { $size: [‘Fantasy’, ‘Drama’] } } )  db.movies.find( { genres: { $all: [‘Fantasy’, ‘Drama’] } } ) https://docs.mongodb.com/manual/reference/operator/query/all/Q23. 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 } }, { _id: ObjectId(“573a13e3f29313caabdc08a4″), genres: [ ‘Horror’, ‘Thriller’ ], title: ‘Mary Loss of Soul’, year: 2014, imdb: { rating: ”, votes: ”, id: 2904798 } } We need to use Aggregation Framework to calculate the following aggregates: -> average imdb rating -> minimum imdb rating -> maximum imdb rating Expected output: [ { _id: null, avg_rating: 6.6934040649367255, min_rating: 1.6, max_rating: 9.6 } ] Please note that some documents have “” (empty string) for the field “imdb.rating”. Exclude these documents before aggregation. Which pipeline should you use?  [{ $match: { “imdb.rating”: { $ne: “” } } }, { $group: { _id: null, avg_rating: { $avg: “imdb.rating” }, min_rating: { $min: “imdb.rating” }, max_rating: { $max: “imdb.rating” } } }]  [{ $match: { “imdb.rating”: { $ne: “” } } }, { $group: { _id: null, avg_rating: { $avg: “$imdb.rating” }, min_rating: { $min: “$imdb.rating” }, max_rating: { $max: “$imdb.rating” } } }]  [{ $group: { _id: null, avg_rating: { $avg: “$imdb.rating” }, min_rating: { $min: “$imdb.rating” }, max_rating: { $max: “$imdb.rating” } } }]  [{ $match: { “imdb.rating”: { $ne: “” } } }, { $group: { _id: null, avg_rating: { avg: “$imdb.rating” }, min_rating: { min: “$imdb.rating” }, max_rating: { max: “$imdb.rating” } } }] https://docs.mongodb.com/manual/aggregation/Q24. Select true statements about shard keys.  Shard keys are used to organize documents into chunks and shards, and mongos can use this to route queries.  Shard keys can include the _id field, but they don’t have to.  All shard keys must be supported by an index with the same document fields. https://docs.mongodb.com/manual/core/sharding-shard-key/Q25. Select all true statements about reconfiguring a replica set with rs.reconfig().  When we reconfigure a replica set with rs.reconfig(), we don’t need to restart any of the individual nodes.  When we reconfigure a replica set with rs.reconfig(), we need to update all of the nodes’ configuration files. https://docs.mongodb.com/manual/reference/method/rs.reconfig/Q26. Select all true statements regarding to unique indexes in MongoDB.  In MongoDB we cannot enforce a unique constraint on compound indexes.  A unique index ensures that the indexed fields don’t store duplicate values.  By default, MongoDB creates a unique index on the _id field.  When creating a unique index, we need to pass an additional unique option set to true. For example:  db.products.createIndex( { manufacturer_id: 1 }, { unique: true } ) https://docs.mongodb.com/manual/core/index-unique/Q27. 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 extract all movies from this collection where genres includes both ‘Crime’ and ‘Mystery’. Which query should we use?  db.movies.find( { genres: { $any: [“Crime”, “Mystery”] } } )  db.movies.find( { genres: { $all: [“Crime”, “Mystery”] } } )  db.movies.find( { genres: { $nin: [“Crime”, “Mystery”] } } )  db.movies.find( { genres: { $in: [“Crime”, “Mystery”] } } ) https://docs.mongodb.com/manual/reference/operator/query/all/Q28. You have a configuration file for mongod instance called mongod.conf in your working directory. How can you launch mongod instance with this configuration file?  mongod –conf mongod.conf  mongod –use mongod.conf  mongod –config mongod.conf  mongod -f mongod.conf https://docs.mongodb.com/manual/reference/configuration-options/#use-the-configuration-fileQ29. How to create a new user with the root role named root_user with password root123?  use admin db.createUser({ user: “root_user”, pwd: “root123”, roles: [“dbAdmin”] })  use admin db.createUser({ user: “root_user”, pwd: “root123”, roles: [“root”] })  use admin db.createUser({ user: “root_user”, pwd: “root123”, roles: [“clusterAdmin”] })  use admin db.createUser({ user: “root_user”, pwd: “root123”, roles: [“dbAdminAnyDatabase”] }) https://docs.mongodb.com/manual/reference/method/db.createUser/Q30. 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 of the following queries will return all document sales with ‘printer paper’ sold?  db.sales.find( { items: { $match: { name: ‘printer paper’ } } } )  db.sales.find( { items: { $elemMatch: { name: ‘printer paper’ } } } )  db.sales.find( { items: { elemMatch: { name: ‘printer paper’ } } } ) Explanation: https://docs.mongodb.com/manual/reference/operator/query/elemMatch/Q31. Select all true statements regarding to schema validation in MongoDB.  Validation rules are on a per-collection basis.  MongoDB doesn’t provide the capability to perform schema validation during updates and insertions.  We need to use db.createCollection() with the validator option to specify validation rules for a new collection. https://docs.mongodb.com/manual/core/schema-validation/Q32. Select true statements about index performance.  For the fastest processing, we should make sure our indexes fit entirely in RAM.  Indexes cannot decrease insert throughput.  Indexes don’t have to be completely stored in RAM, but permanent disk access to retrieve index information will have a performance impact. https://www.mongodb.com/blog/post/performance-best-practices-indexingQ33. How can we represent a one-to-one relationship in MongoDB?  We can link to a single document in another collection.  We can embed fields as a child document in the document.  We can embed fields in the document. https://docs.mongodb.com/manual/tutorial/model-embedded-one-to-one-relationships-between-documen ts/Q34. Does MongoDB support query operations that perform a text search of string content?  Yes  No https://docs.mongodb.com/manual/text-search/ Loading … Ultimate Guide to the C100DEV - Latest Edition Available Now: https://www.braindumpsit.com/C100DEV_real-exam.html --------------------------------------------------- Images: https://blog.braindumpsit.com/wp-content/plugins/watu/loading.gif https://blog.braindumpsit.com/wp-content/plugins/watu/loading.gif --------------------------------------------------- --------------------------------------------------- Post date: 2023-08-13 16:53:56 Post date GMT: 2023-08-13 16:53:56 Post modified date: 2023-08-13 16:53:56 Post modified date GMT: 2023-08-13 16:53:56