Database structure for music

Here is a question I am trying to figure out. If you have a database of music where you store the individual song for each artist how then would you record if the song features someone especially if the person is only a one time entry into the database? note to that the number of features will not be limited to 2 but can be any number of persons.

with a one-to-many table, so that the features are each a separate row, that way you can have an unlimited number of them

ok not sure exactly what you mean. At this time lets say I have 2 tables artist and song where

Artist table has
artist_id
artist_name

song table has
song_id
artist_id
song_name

How would the relationship you spoke about work in this case as the artist.artist_id is already one to many with song.artist_id.

artists
id
name

songs
id
name
artist_id

songfeats
song_id
artist_id
seq – optional

this is good however what about a feature of an artist not in the database. So the main artist is part of the database but the artist featured is just a one time entry for a track

that’s interesting… how do you think you should handle that, in light of the songfeats table?

Am not sure but am looking at it from a real world perspective, where I may have rights to use someones music because they are subscribed to the database. However it is possible they can have a song that features someone who isn’t subscribed to the database. So legally I cannot have any info on the featured artist but I can mention that artist as a feature to a song. Thinking about it I maybe able to store them in the database just for data purposes but not have anything about them in the database itself, that sounds like the only viable option.

now you’re thinking :slight_smile: