I'm using Mongodb for a "social network" kind of project.
I need to manage a kind of many to many relation between videos and "likes" for the user, so for example a user can like many videos and of course a video is liked by many users
I've been thinking on doing a field on each model (user and videos) that store the users id of users who liked the video and the videos id of the videos the users has liked, but I'm worried about the following:
What would be the performance of having an array of videos and users ids VS having a different collection like a UserLikeVideos in which I store the userid and the videoId liked, when a user likes a million videos for example!
Eventually I would like to show the videos a user liked, the number of likes of a video and the number of likes a user has given...