I have this database on Indian Film Songs which I made for personal use. I must explain a bit of databse before posing the question. The songs are sung by singers(may be one, 2 or sometimes even 4-5) So I made a song table, a singers table and a join table like:
Song Table SongID Song etc. (fields)
Singers table SingerID SingerName
SungBy Join Table SongID SingerID
So now for a duet the join table has 2 records with common SongID and different SingerID. If there are 4 singers to a song, there will be for records in the join table.
Now the query I need is that if I wish to get all songs sung by 2 specific singers, I should get those songs only. If I want songs sung by only one singer say s1, I should get only those songs but not other songs in which that singer is one of many other singers.
How do I run this query?
Or does my table need alteration of any sort? I already have entered a 100 songs for testing but I cannot get around this problem.
Any help will be appreciated. It is my personal hobby and so I alone am going to use this database.
Thanks
Song Table SongID Song etc. (fields)
Singers table SingerID SingerName
SungBy Join Table SongID SingerID
So now for a duet the join table has 2 records with common SongID and different SingerID. If there are 4 singers to a song, there will be for records in the join table.
Now the query I need is that if I wish to get all songs sung by 2 specific singers, I should get those songs only. If I want songs sung by only one singer say s1, I should get only those songs but not other songs in which that singer is one of many other singers.
How do I run this query?
Or does my table need alteration of any sort? I already have entered a 100 songs for testing but I cannot get around this problem.
Any help will be appreciated. It is my personal hobby and so I alone am going to use this database.
Thanks