Answer the question
In order to leave comments, you need to log in
Is using relationships in Mongo OK?
Is it okay to use relationships in Mongo? For example, the Collection "group" contains an array of references ref "people" -- the people who are members of this group. How to be, is it better to embed people as a whole object or by reference? And another moment, if the collection "institution" should also refer to some "people", then here too by reference, or to embed the whole person here and there? But if you embed it entirely, then the difficulty is in synchronizing the relevance of a person’s data, suddenly the original person changes its fields, you will have to go over all the places where this person is and update his fields.
Answer the question
In order to leave comments, you need to log in
Asking questions like this - are you sure that you need Mongo to take? Maybe it's better to do everything on relational databases?
It looks like you have related data. Under such data it is worth using relational DBMS.
Mongo for other tasks (logging, etc.).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question