When to use subdocuments in MongoDB? -


i'm mysql background, , might misunderstanding uses of mongo's subdocs.

i have bunch of users can write , publish articles. these articles ever seen user.

should these articles stored references users or in userschema:

articles: [articleschema] 

mongodb essence allows replace join subdocuments. keep in mind there no native join in mongodb in sql world. depending on query structure, may either embed users in articles or articles in users.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -