[eluser]Unknown[/eluser]
Say i want to create a database of all my music. First i have a table, 'songs', with columns for each peice of info for each song; id, artist, album, name, length, etc etc.
Firstly; i want to add playlists; how should i do this?? (performance being key)
1) Add a column for each playlist with true/false(or empty)
2- Create a new table for playlists... (column = pl name)
-a) Each song's id is on a new row
-b) There is only one row and the entire playlist is stored as one cell containing something like a JSON array, of the song IDs
3) Just store it like a JSON array or similar of song ids, in a file for each playlist.
I would be inclined towards 3, although i fear it might not perform well where queries need to be ran alongside it.. for example to search for songs where artist = X, within a playlist.
Secondly;
Would you suggest i use an SQL database rather than something like mongoDB?? The server will be very weak, and may deal with up to 50k entries (songs).
If SQL.. postgreSQL? or ??