MongoDB DEV · Question 103 · Multiple choice

By default, documents in a MongoDB collection must contain: Check all that apply:

Answer options

  1. A.
    the same fields for every document in the collection.
  2. B.
    at least 2 fields.
  3. C.
    the _id field.

Answer confidence: High

Correct answer: C

Explanation language: Chinese

MongoDB 会为每个集合自动创建 _id 索引,插入文档时必须带 _id(未提供时由驱动/服务端自动生成 ObjectId),所以 C 正确。A、B 错:同一集合各文档字段可以完全不同,字段数量也没有下限,只有 _id 是必有的。

Papers containing this question

This question appears in 3 bank records. Public pages combine identical prompts and options. Selected questions display the highest-confidence record; the others show a short preview. Paper-based learning preserves each record's answer, explanation, and confidence.

AUTHOR · PROJECTS · OPEN SOURCE

Author & MongoDB projects

Building data platforms, MongoDB migration and sync tools, and cloud operations products.

Contact the author for any MongoDB needs.

Contact the author ↗mlhp123@outlook.com

Support the author

If this question bank helps you, optional donations are welcome.

Scan with Alipay to support the authorOpen full-size donation image ↗