Let’s say i have a youtube kind of application, where there are two entities video and user. I want to store information about likes, comments on video. So there would be many to many relationship between users and videos.How to design schema for the use case?
- Adding reference of user in video document as array of user ids? in this case array will grow to billion.
- Adding reference of video id in user document as array of video ids? in this case videos array will be limited in size.
- Any other solution?
Please help me with the solution.