Preserve Joins by code in MongoDB
Asked Answered
B

1

1

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.

Bahia answered 27/12, 2010 at 22:43 Comment(2)
Can you expand on your question? I'm assuming you mean left JOINS not JOINTS ... what do you mean by "preserving" them?Shockley
Imagine Posts and Caregories, Tags in three tables. NoSQL demand to denormalize data in one unique document, but many cms need to preserving interfaces like ICategory,ITags, IPost and much more. The object is how to return these interfaces simulating pseudo joins using MongoDb and limiting the cost in queries if you can not change the original architecture to build denormalized documents.Bahia
F
0

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.
Fascine answered 28/12, 2010 at 6:20 Comment(1)
It's not possible to embed documents creating pseudo joints?Bahia

© 2022 - 2024 — McMap. All rights reserved.