Preserve Joins by code in MongoDB

独自空忆成欢 提交于 2019-12-11 05:48:07

问题


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.


回答1:


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.


来源:https://stackoverflow.com/questions/4542370/preserve-joins-by-code-in-mongodb

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!