It depends on so many things and in the end you’ll probably need to make the decision yourself, but in this case I’d advise on making a separate collection for checkins, some reasons I can immediately come up with:
Storing checkins into the user collection would mean every time a user logs in this data is automatically downloaded as well, might become inefficient if they have 1000s of logins (not very probable, but you know).
Separating the data allows for easier querying. For example, running a query that gets all the checkins in a certain day will run a lot faster and more efficient if you have a checkins collection since you won’t need to iterate over all users’ objects.
Ultimately a checkins object only needs some minimal data like a timestamp and the userId, but could easily be extended in the future as well.
Yeah, I have it with two collections currently using the time stamp and playerId. Only because that’s what makes sense in my head from SQL. But I read so much about denormalization it’s got me all out of whack. Lol. All of what you said makes sense. Thank you.
I’d say that if you need to keep the timestamp for all occurrences, then definitely a separate collection for check-ins. Besides the reasons @nlammertyn mentioned (which are super important in the Meteor context due to how data flows), if you embed check-ins in a player document, mongo will need to move it on disk as the document grows, which is inefficient. If there’s some sort of frequent info you’ll need to query with the player document, then it may be worth denormalizing it.
Moreover, since you want to generate reports at some point, depending on how complex they are you’ll probably want to index this somehow. Reasoning about this in a separate collection should be easier. And you might even need to pre-aggregate this data in a separate stats collection.
Anyway, at the end it all depends on your use cases!