Hey all,
Hopefully this isn't a stupid question. Not sure what would be considered best practice / preferred.
Let's say I have two collections, Users and Events, where each User can be the owner of multiple Events.
To retrieve a given users Events, is it better to:
a) Store the ID's in an Array field called 'events' on the User. When I need the Events, populate this Array
b) Create an index on the 'owner' field of the Events and perform look-ups on that key when I need a given users Events. No need to store an Array 'events' on User.
Additionally, if I wanted to take that a step further and find Events greater / less than certain dates, it seems like setting a Compound Index on owner/date is the way to go. Thanks!
--Sam