Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Music playlist database design

How to structure tables for songs and playlists?

My thought was to create a table of playlists titles and id's then a playlists songs table that holds the songs unique id and the playlist which it belongs to. The other plan a new table for each playlist and store song information in each table for the playlist.

Would this be a good approach or is creating new tables bad for performance or any other reason?

like image 429
Dan Fumosa Avatar asked Oct 14 '25 23:10

Dan Fumosa


1 Answers

How about something like this?

Songs:

id title length artist_id

Artists:

id name

Playlists:

id title user_id 

Playlists_Songs:

playlist_id song_id

Users:

id name email 
like image 178
chrisShick Avatar answered Oct 17 '25 11:10

chrisShick



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!