• 在规范化数据模型中,地址文档包含对顾客文档的引用。 ```json // address document { street: “123 Fake Street”, city: “Faketon”, state: “MA”, zip: “12345”, patron_id: “joe”, // reference to patron document }

    // patron document { _id: “joe”, name: “Joe Bookreader” }

    1. - 使用嵌入式数据模型,您的应用程序可以通过一个查询来检索完整的顾客信息。
    2. ```json
    3. {
    4. _id: "joe",
    5. name: "Joe Bookreader",
    6. address: {
    7. street: "123 Fake Street",
    8. city: "Faketon",
    9. state: "MA",
    10. zip: "12345"
    11. }
    12. }
    • 嵌入式文档模式的潜在问题是,它可能导致大型文档包含应用程序不需要的字段。