My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

How should I structure my MongoDB collection to store video watching history of users?

Default profile photo
Anonymous
·Feb 12, 2019

I am developing a video on demand API with watch history which saves the videos that a user watched. I need suggestion on how to create the collection.

Should I:

  1. Create create collections for each user
  2. or create collection for all the users - that way I will be posting to the single collection the video user watched with username and user id.

If you have better alternatives, feel free to share with me.