Answer the question
In order to leave comments, you need to log in
Do I need to store links (id) to child documents in mongodb?
There are two documents in the database: people and doc. doc is always owned by people.
In doc I create the owner (id) field, similarly in people there is an array docs for storing document id.
Does it make sense for people to have an array with id docs? Will the find query be faster by _id (passing an array of IDs) than by owner? If neither is right, then what is right?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question