I'm building a streaming music service that will have features like:
- Follow users
- Like songs
- Create and manage playlists
- ...etc.
I'm using Rails 3.1, Mongoid and MongoDB. I'm unsure how I should model my User, Playlist and Song models.
There is a many to many relationship between playlists and songs. Mongoid is storing ObjectId's of each song in an array of each playlist. But I need to add some metadata to each song <-> playlist relationship, like the position of the song in the specific playlist.
I'm also unsure of how to do things like finding out which mutual friends and mutual likes a user has with another user. Is is really a good idea to store a users likes and friends inside the user document? A user could possibly have several thousand likes and over a thousand friends etc.
Is this kind of stuff better suited for a relational database?