Preserve Joins by code in MongoDB

2019-07-28 03:33发布

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条回答
乱世女痞
2楼-- · 2019-07-28 03:41

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.
查看更多
登录 后发表回答