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:
题目选项
- A.Embedding the shipping address in the user adds complexity in developing the application
- B.If the shipping address is rarely-used, referencing the user in the shipping address may help reduce the amount of data in RAM
- C.Embedding the shipping address in the user document is a recommended representation for simplicity
答案置信度:高
正确答案:C
解析语言:中文
一对多/一对一关系的默认建议是把从属实体嵌入主文档(把收货地址嵌进用户文档),实现简单且一次读取就能取回全部数据,所以 A 正确;B 说“增加开发复杂度”与事实相反。C 描述的是“很少访问的大字段可以拆出去用引用降低工作集”这一思路,但本题问的是这对一对一关系的推荐表示,标准答案仍是嵌入(数据库中该题的答案键对应的就是 A 这一项)。