CertGrid
Data Certification

MongoDB Associate Developer Practice Exam

MongoDB Associate Developer - validates hands-on developer skills with MongoDB: the document model and BSON, CRUD operations (querying with find and operators, inserts, updates, and array/embedded-document manipulation), indexes (single, compound, multikey, and specialized) and reading explain output, data modeling (embedding vs referencing), the aggregation pipeline, and connecting through the official drivers. Uses mongosh / MQL, language-agnostic.

Practice 762 exam-style MongoDB Associate Developer questions with full answer explanations, then take timed mock exams that score like the real thing.

762
Practice pool
53 qs
Real exam
90 min
Real exam time
Intermediate
Level
70%
Passing score

CertGrid runs a fixed 53-question timed mock, separate from the real exam format above.

Objective-mapped practice, aligned to current exam objectives · Reviewed Jul 2026 · Independent practice platform.

What the MongoDB Associate Developer exam covers

Free MongoDB Associate Developer sample questions

A sample of 10 questions with answers and explanations. Sign up free to practice all 762.

  1. Question 1Aggregation

    In MongoDB's aggregation framework, what does the pipeline consist of?

    • AA single filter run once against the whole collection
    • BAn ordered array of stages that pass results alongCorrect
    • CA set of triggers fired after each write operation
    • DA schema used to validate documents before insert
    ✓ Correct answer: B

    Aggregation pipelines are defined as an array of stage documents, such as [{$match:...},{$group:...}]. Each stage receives the documents produced by the previous stage and passes its own output forward, letting complex transformations be built from simple steps.

    Why the other options are wrong
    • AThat describes a simple find() filter, not the multi-stage aggregation pipeline.
    • CAggregation stages are not triggers; they run synchronously when the pipeline executes.
    • DSchema validation is a separate collection option, not what an aggregation pipeline is.
  2. Question 2Aggregation

    Why is it generally more efficient to run $match before $group rather than after, when the filter does not depend on grouped results?

    • AIt shrinks the working set before the costlier grouping work beginsCorrect
    • BIt changes $group's accumulator behavior to run faster
    • CIt forces MongoDB to build a new index automatically
    • DIt has no effect; $group always scans the full collection first
    ✓ Correct answer: A

    Because $group typically has to examine, bucket, and accumulate every document it receives, filtering out irrelevant documents beforehand with $match reduces the input size, lowering the amount of work $group and later stages must perform, and can also let $match use an index.

    Why the other options are wrong
    • B$match filtering documents does not alter how the accumulators inside $group compute their results, only how many documents feed into them.
    • C$match uses existing indexes when available; it does not automatically build new ones.
    • DPlacing $match first means $group only ever sees the filtered subset, not the full collection.
  3. Question 3CRUD Operations

    db.items.insertMany([{ _id: 1, name: 'A' }, { name: 'B' }]) is run against an empty collection. What _id values result?

    • AThe first keeps _id: 1; the second gets an auto-generated ObjectIdCorrect
    • BBoth documents get new ObjectIds; the explicit 1 is overridden
    • CThe call fails since explicit and generated ids cannot mix
    • DBoth documents end up sharing the same _id value of 1
    ✓ Correct answer: A

    MongoDB honors the explicitly supplied _id: 1 on the first document and generates an ObjectId for the second, since it omitted _id; mixing explicit and omitted ids across documents in the same insertMany() call is fully supported.

    Why the other options are wrong
    • BMongoDB honors an explicitly supplied _id rather than overriding it.
    • CMixing explicit and omitted _id values across documents in one insertMany() call is fully supported.
    • DEach document is still assigned its own distinct id; they do not end up sharing one.
  4. Question 4CRUD Operations

    Which query returns `products` documents where category is 'electronics' AND price is less than 200 AND qty is greater than 0?

    • Adb.products.find({$and: {category: 'electronics', price: {$lt: 200}, qty: {$gt: 0}}})
    • Bdb.products.find({category: 'electronics' && price: {$lt: 200} && qty: {$gt: 0}})
    • Cdb.products.find({category: 'electronics', price: {$lt: 200}, qty: {$gt: 0}})Correct
    • Ddb.products.find({$or: [{category: 'electronics'}, {price: {$lt: 200}}, {qty: {$gt: 0}}]})
    ✓ Correct answer: C

    {category: 'electronics', price: {$lt: 200}, qty: {$gt: 0}} requires all three conditions to be true simultaneously, since MongoDB implicitly ANDs together every top-level field in a filter document.

    Why the other options are wrong
    • A$and requires an array of filter documents as its value, not a single plain object.
    • BThe && operator is JavaScript logic and is not valid inside a BSON filter document.
    • D$or would match documents satisfying any one of the three conditions, not all three together.
  5. Question 5CRUD Operations

    In mongosh output, a document field appears as _id: ObjectId("64f1a2b3c4d5e6f7a8b9c0d1"). What does this represent?

    • AA string field that happens to start with numbers
    • BThe document's unique identifier, shown as a BSON ObjectIdCorrect
    • CAn index name generated by MongoDB
    • DA reference to another collection's shard key
    ✓ Correct answer: B

    mongosh renders the BSON ObjectId type stored in _id using the ObjectId(...) wrapper syntax, representing the document's unique identifier rather than a plain string.

    Why the other options are wrong
    • AObjectId is a distinct BSON type, mongosh is not simply printing a plain string.
    • CObjectId values identify documents, they are not index names.
    • DAn ObjectId shown for _id is not inherently a cross-collection reference or shard key value.
  6. Question 6CRUD Operations

    Is `db.users.updateOne({_id: 1}, {$set: {name: "Ana"}, $currentDate: {lastModified: true}})` a valid update call?

    • AYes, an update document can combine multiple different operatorsCorrect
    • BNo, $currentDate can never be combined with $set under any circumstances
    • CNo, only one update operator is allowed per update document
    • DYes, but only when using updateMany, never updateOne
    ✓ Correct answer: A

    A single update document may contain multiple distinct top-level operators, such as $set alongside $currentDate, and MongoDB applies all of them together in the same write. This is different from the invalid case of mixing an operator with a plain, non-operator field, which does cause an error.

    Why the other options are wrong
    • B$currentDate combines with $set (and other operators) without any conflict.
    • CMongoDB does not restrict an update document to a single operator; several can coexist.
    • DThis combination of operators works identically whether called through updateOne or updateMany; it is not restricted to one method.
  7. Question 7CRUD Operations

    A developer relies on single-document atomicity instead of a multi-document transaction to update one products document's qty and lastUpdated fields together in one updateOne call. Why is this a safe choice?

    • ABecause updateOne always runs inside a hidden session
    • BBecause qty and lastUpdated are always updated in separate network round trips
    • CBecause both field changes apply as one atomic unit to that single documentCorrect
    • DBecause MongoDB automatically starts a transaction for any update with more than one field
    ✓ Correct answer: C

    Since qty and lastUpdated belong to the same document and are set in the same updateOne call, MongoDB's built-in single-document atomicity already ensures they change together with no partial state exposed.

    Why the other options are wrong
    • AThere is no hidden session automatically wrapping every updateOne call.
    • BBoth fields are updated in the same single round trip, not two separate ones.
    • DMongoDB does not auto-start a transaction just because more than one field is being updated.
  8. Question 8CRUD Operations

    By default, findOneAndUpdate returns which version of the document?

    • AOnly the matched count
    • BThe document as it was before the updateCorrect
    • CThe document after the update
    • DThe upserted id only
    ✓ Correct answer: B

    By default findOneAndUpdate returns the original document as it was before the change. To get the updated version you pass returnDocument: "after". It returns the document itself, not just a count or an id.

    Why the other options are wrong
    • AfindOneAndUpdate returns a document, not a matched count.
    • CThe after version is returned only when you set returnDocument: "after".
    • DThe upserted id appears in write results, not as this method's default return.
  9. Question 9Data Modeling

    What is a key drawback of embedding a large, frequently changing sub-object inside many parent documents instead of referencing it?

    • AThe embedded data becomes permanently read-only
    • BMongoDB rejects any document containing embedded objects
    • CUpdating the shared data means updating every duplicate copyCorrect
    • DEmbedded sub-objects cannot be indexed at all
    ✓ Correct answer: C

    When the same evolving data (for example, a shared warehouse address) is embedded into many parent documents, any change to that data must be propagated to every copy, unlike referencing, where the shared data lives in one place and is updated once.

    Why the other options are wrong
    • AEmbedded data is fully readable and writable like any other field; it is not locked to read-only.
    • BMongoDB fully supports embedded documents; there is no such rejection.
    • DFields inside embedded documents can be indexed, including with dotted-path index definitions.
  10. Question 10Indexes

    Why is an index on `email` in a `users` collection generally considered more selective than an index on `isActive`?

    • AEmail fields are always required, while isActive is optional
    • BMongoDB treats string fields as more selective than boolean fields by default
    • CSelectivity depends only on field name length, and email is longer
    • DEmail values are mostly unique, so an equality match narrows results to very few documentsCorrect
    ✓ Correct answer: D

    Because most users have a distinct email address, an equality match on email typically narrows the result set to one or a few documents, which is the definition of a highly selective field, unlike a boolean field with only two possible values.

    Why the other options are wrong
    • AField requiredness is unrelated to how much a value narrows query results.
    • BMongoDB's query planner does not assign selectivity based on data type alone; it depends on actual value distribution.
    • CSelectivity is about value distribution, not the length of the field's name.

Who this MongoDB Associate Developer practice exam is for

This practice set is for anyone preparing for the MongoDB Associate Developer exam at the intermediate level - from first-time candidates building a foundation to experienced Data practitioners doing a final review before test day. If you learn best by working through realistic questions and reading why each answer is right or wrong, it is built for you.

How to use this MongoDB Associate Developer practice exam

  1. Start with the free sample questions above to gauge your current baseline.
  2. Read the full explanation on every question, including why each wrong option is wrong.
  3. Track your weak domains and focus your study where you are losing the most marks.
  4. Once you are scoring consistently well, take a timed, full-length mock exam.
  5. Use your readiness score to decide when you are ready to book the real MongoDB Associate Developer exam.

Related Data resources

MongoDB Associate Developer practice exam FAQ

How many questions are in the MongoDB Associate Developer practice exam on CertGrid?

CertGrid has 762 practice questions for MongoDB Associate Developer, covering 6 exam domains. The real MongoDB Associate Developer exam is 53 qs in 90 min. CertGrid's timed mock is a fixed 53 questions.

What is the passing score for MongoDB Associate Developer?

The MongoDB Associate Developer exam passing score is 70%, and you have about 90 min to complete it. CertGrid scores your practice attempts the same way so you know when you are ready.

Are these official MongoDB Associate Developer exam questions?

No. CertGrid is an independent practice platform. We do not provide real or leaked exam questions. Our questions are original and designed to help you practice the concepts, scenarios, and difficulty style of the MongoDB Associate Developer exam.

Can I practice MongoDB Associate Developer for free?

Yes. You can start practicing MongoDB Associate Developer for free with daily practice and sample questions. Paid plans unlock full timed exams, complete explanations, and domain analytics.

What CertGrid is (and is not)

CertGrid is an independent IT certification practice platform for Azure, AWS, Google, Cisco, Security, Linux, Kubernetes, Terraform, and other certification tracks. It provides objective-mapped practice questions, readiness scoring, weak-domain drills, and explanations to help learners understand what to study next.

Independent & original. CertGrid is an independent practice platform and is not affiliated with or endorsed by MongoDB. Questions are original practice items designed to mirror certification concepts and exam style. CertGrid does not provide official exam questions or braindumps.