While figuring out with rather complicated " $lookup" operator I was confused why actually we should it in this way?
I mean Why actually you’ve separated the data into two different collections (movies & comments)?
Why don’t we just store comments as a field (as an array of documents) in every Document in Movie collection?
Is it because of 16mb limit for each document in MongoDB? (We are afraid that users would write A LOT of comments for some movies and they could take more than 16mb together.)
Or because of the fact that it would be more easy to make some operations with comments (
For example, to let user to modify his comment
or to remove all the comments that were written by certain user without creating some “Multikey Indexies” beforehand)?
It’s not very clear for me if it would be better to store this data in one collection.