在 MongoDB 中通过代码保留连接

发布于 2024-10-09 12:37:51 字数 94 浏览 0 评论 0原文

如果您无法修改一个 cms 的完整架构,那么在 MongoDB/Norm 等 NoSQL 解决方案中保留左连接的最佳解决方案是什么?经验、样品、成本。

谢谢。

What are the best solution to preserve left joins in a NoSQL solutions like MongoDB/Norm if you can not modify the complete architecture of one cms. Experiences, Samples, Cost.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

北城挽邺 2024-10-16 12:37:51

我可以建议两种方法:

  1. 创建大文档,我的意思是将两个、三个、十个实体合并为一个。因此,例如,如果您有一对多的引用,并且您知道在大多数情况下“许多”不超过 100 个,您可以将这些实体合并为一个。
  2. 使用问题位置所需的数据创建“非规范化”文档。因此,只加载一个文档,而不是任何连接。

I can suggest two ways:

  1. Create big documents, i mean combine two, three, ten entites into one. So if you, for example, have reference one to many and you know that 'many' not more than 100 for most cases you can combine these entities into one.
  2. Create 'denormalized' documents with data that you need at problem places. So instead of any joins load only one document.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文