In MongoDB, is it better to dissociate Schemas or put them together? In MongoDB, is it better to dissociate Schemas or put them together? mongoose mongoose

In MongoDB, is it better to dissociate Schemas or put them together?


imho as long as the size of stories will fit in bson document limit, embed them into main document.

This will speed up retrieval process and also will enable ACID updates on document level.


Would a sentence make much sense in isolation? Could you reuse a sentence more than once? I think it is unlikely that a sentence would make much sense without the context of the story, and its very unlikely that you would want the reuse a sentence.

Therefore the story document should be composed of the sentence sub-documents. I.e. you would have one collection (stories) and each story document will contain a collection of sentence sub-documents. This would be the second schema you've shown.


Sentences in Story because the max is only 20MongoDB is "joinless" and it must be used as a "joinless"

You must use multiple collections for one to many relationships whenever the "many" is very large