Best practice - extending todo tutorial with favorites and multiple users


#1

Still trying to understand some best practices with mongo and meteor. If adding a favorites ability to the todo tutorial, assuming i have multiple users, would it make more sense to add a favorites row in each list collection that stores multiple user id’s, or would it be better to make a new favorites collection to store a list id and a user id in each item?


#2

Mongo doesn’t have joins.

For that reason it’s not just best practise to denormalize your data, it’s really the only viable practise. Depending on how you want to display the data, you might want both an array of userid in the todo collection and an array of todo id’s in the user collection.