There is no "right way" to do anything, but there are "better" and "worse" ways, as well as true and tested ways.
I'm studying Mongo and considering it for a project. It's gonna start small but possibly grow a lot.
Now, I understand there are different ways to organize information in MongoDB. Since there are no joins, I either insert ids (Or arrays) and do multiple queries to get a related item (I.e. person for a company, company Id on people object or array of people on company table), or I insert objects directly inside... (I.e., people as objects in an array inside the company, as opposed to being "decoupled").
Now, my issue is: what if I need to change how I load this info?
A good example, taking the users idea, is if I wanna get all people (Of all companies) inactive for the last month. Now, would I need to look separately into one company at a time to query this information? Should I keep them separate and use ids as references in this case...?
What are the tradeoffs, the performance impacts, and which approach is considered "more appropriate" by the community?