Courseiva

C100DEV MongoDB Overview and Document Model Practice Question

Exhibit

{
  "_id": ObjectId("60f..."),
  "user": "alice",
  "metadata": {
    "$created": "2023-01-01",
    "last_login": null
  }
}

Refer to the exhibit. Why would an operation attempting to insert the document shown in the exhibit fail?

⚠ Common exam trap

Test-takers frequently confuse reserved field names starting with a dollar sign with normal custom data fields, missing that the parser treats them as query operators.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

The field '$created' starts with a reserved character.

The document contains a field named '$created'. In MongoDB, field names starting with a '$' symbol are reserved for internal query operators. When the database engine parses a document, it interprets fields beginning with '$' as instructions rather than data fields. This naming conflict is a common trap for developers migrating legacy data or building generic metadata structures without validating field name constraints.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    The '_id' field is invalid.

    Why it's wrong here

    The '_id' field shown is a valid ObjectId, which is the standard primary key in MongoDB. It conforms to the required 12-byte format, so the insertion would not fail due to this field. The issue lies elsewhere in the document structure, specifically with the reserved character usage in field names.

  • ✗

    The field 'metadata' is a reserved keyword.

    Why it's wrong here

    The term 'metadata' is not a reserved keyword in MongoDB. Users are free to use this term for field names in their documents. The failure of the document is strictly related to the use of reserved characters in the nested field, not due to the choice of the parent key name.

  • ✓

    The field '$created' starts with a reserved character.

    Why this is correct

    MongoDB reserves the dollar sign ($) at the beginning of a field name for its own internal operators, such as $set or $push. Because the database tries to evaluate '$created' as an operator instead of a string key, the document insertion will be rejected by the server as invalid.

  • ✗

    The value 'null' is not allowed for the 'last_login' field.

    Why it's wrong here

    MongoDB fully supports the null data type. Storing a null value is perfectly acceptable and common for fields that have no value or are not yet set. The failure is not caused by the data type, but rather by the illegal naming convention used for the parent object's key.

About these practice questions

One of 259 original C100DEV practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official MongoDB exam blueprint

This C100DEV practice question is part of Courseiva's free MongoDB certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the C100DEV exam.