Stefan Maimon
Stefan Maimon

Reputation: 233

phpMyAdmin column reference

I`m working with phpMyAdmin database, and I have two tables - "Playlist" and "Songs". At the Playlist table I want to have a column of "Songs in playlist", that will contain a list of the "Songs id" from the "Songs" table. can I do that ?

Upvotes: 0

Views: 155

Answers (1)

idstam
idstam

Reputation: 2878

You will need to add a new table that contains a reference to both playlist and songs. That way you have made a many-to-many relation. http://en.wikipedia.org/wiki/Many-to-many_%28data_model%29

Upvotes: 2

Related Questions