@startuml spotify ' visual style hide circle ' straight lines skinparam Linetype ortho skinparam Nodesep 110 skinparam Ranksep 80 entity User { * id: <> --- * first_name: Text * last_name: Text * email: Text * password: Text * birth_date: Timestamp * profile_picture: <> } entity Song { * id: <> --- * name: Text * duration: Timestamp * release_date: Timestamp ' endpoint for streaming service * streaming_address: <> cover_picture: <> } entity Album { * id: <> --- * name: Text * release_date: Timestamp * description: Text * cover_picture: <> } entity Artist { * id: <> --- * profile_picture: <> * cover_picture: <> * description: Text * verified: bool } entity Genre { * id: <> --- * name: Text * description: Text * cover_picture: <> } entity Playlist { * id: <> --- * cover_picture: <> * duration: Timestamp } ' User has `0 to infinite` number of playlists. Playlist is always created by exactly one user (could be expanded to allow collaborative playlists). User ||..o{ Playlist: user_playlists ' a user account can also be an artist -> only one per account User ||..o| Artist: can_be_artist ' song belongs to an album. Song can only belong to one album (could be expanded so that one song can belong to more albums) Album ||.o{ Song: has_songs ' album can belong to multiple genres Album }o..o{ Genre: albums_have_genres ' artist has albums. Albums can only have one artist (could be expanded to allow features etc.) Artist ||..o{ Album: has_albums ' song can be saved in a playlist Playlist }o..o{ Song: playlists_have_songs ' even playlists can belong to certain genres -> spotify genre allows you to listen to playlists Playlist }o..o{ Genre: playlists_have_genres @enduml