MongoDB DEV · Question 217 · Multiple choice

Consider an entity containing a user and another entity containing the shipping address for this user. Which of the following statements are true about the representation of a one-to-one relationship between the user and the shipping address? Check all that apply:

Answer options

  1. A.
    Embedding the shipping address in the user adds complexity in developing the application
  2. B.
    If the shipping address is rarely-used, referencing the user in the shipping address may help reduce the amount of data in RAM
  3. C.
    Embedding the shipping address in the user document is a recommended representation for simplicity

Answer confidence: High

Correct answer: C

Explanation language: Chinese

一对多/一对一关系的默认建议是把从属实体嵌入主文档(把收货地址嵌进用户文档),实现简单且一次读取就能取回全部数据,所以 A 正确;B 说“增加开发复杂度”与事实相反。C 描述的是“很少访问的大字段可以拆出去用引用降低工作集”这一思路,但本题问的是这对一对一关系的推荐表示,标准答案仍是嵌入(数据库中该题的答案键对应的就是 A 这一项)。

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 ↗