All quizzes
Free quiz · 50 questions in the bank

MongoDB quiz

Test your MongoDB knowledge with a free interactive quiz — 50 questions with answers and explanations. No signup needed to play.

Question 1/5Score 0

If you insert a document without an `_id` field, what happens?

Questions in this quiz
  1. If you insert a document without an `_id` field, what happens?
  2. In `db.users.find({}, {name: 1, _id: 0})`, what does the second argument do?
  3. How are dates typically stored in MongoDB?
  4. In MongoDB terminology, what does a "collection" correspond to in a relational database?
  5. What is BSON?
  6. Which update operator increments a numeric field?
  7. What does the `upsert` option do in an update?
  8. What does a single-field index on `email` enable?
  9. Which logical operator combines conditions so that ALL must match?
  10. When deciding between embedding a sub-document and referencing it by id, the most common starting heuristic is:
  11. What is an `ObjectId` in MongoDB?
  12. How would you query for documents where `status` is either `"active"` or `"pending"`?
Gaps to close?
Read the curated MongoDB notes — core concepts, patterns, interview prep.
MongoDB notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web