![]() You can add additional info to the relation as well (for example the position of the song in the playlist, etc.) To model this, you create a relation table, that maps a song to a playlist - basically you just need the song id and the playlist id. A song can be part of many playlists and a playlist can contain multiple songs. ![]() You can have one songs table and one playlists table. I would recommend you go with the classic many - to - many approach. Is there some way to have both speed and asynchronously.? ![]() Pros->database is smaller cause no duplicate songs exist,search is fairly easyĬons->user can't add or remove songs asynchronously on every playlist(the actual problem i don't want) One other way i am thinking of doing this using one table to keep everything from all playlists but then the user can't add or remove songs asynchronously on every playlist(it has to wait-> the table is locked),but the search is only in one table. Pros->Allows user to do edits on each playlist asynchronouslyĬons->Slow on searching,Big database file An app exists which allows user to build multiple playlists filled with songs.Įvery playlist is using an sql table to save the songs in database.This gives the opportunity to the user to make changes on each playlist asynchronously(for example remove or add new songs).īut here comes the problem when i want to search all the database tables(-> playlists) for some songs i have to join all these tables and this is slow. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |