MongoDB DBA · Question 122 · Multiple choice

6. Which of the documents below from the people collection will be affected by the following query? db.people.deleteMany( { "lastName": "Aaronson", "firstName": "Arthur" } ) Check all that apply:

Answer options

  1. A.
    { "_id": ObjectId("57fd413814c25e5820455eec"), "lastName": "Barnes", "firstName": "Arthur" }
  2. B.
    { "_id": ObjectId("57fd414c14c25e5826a65918"), "lastName": "Chan", "firstName": "Dorothy" }
  3. C.
    { "_id": ObjectId("57fd415614c25e582c83aac1"), "lastName": "Aaronson", "firstName": "Beth" }
  4. D.
    { "_id": ObjectId("57fd415d14c25e583246212a"), "lastName": "Aaronson", "firstName": "Arthur", "middleName": "Alan" }
  5. E.
    { "_id": ObjectId("57fd416714c25e5838ab079c"), "lastName": "Aaronson", "firstName": "Arthur" }

Answer confidence: High

Correct answer: D, E

Explanation language: Chinese

deleteMany 按 {lastName:"Aaronson", firstName:"Arthur"} 匹配:B 完全相符,E 多一个 middleName 也照样匹配(查询只约束这两个字段,额外字段不影响)。C 的 firstName 是 Beth,A、D 至少有一个字段不符,都不会被删除。

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 ↗