Indeed, another problem I have is that if a single is on an album, which track it is on the album.
I want to centre the site on the Charts that are generated weekly for singles and albums so if I use that as my source for the lookup and then have the data contained in separate fields that are linked to this table. Will that be making things easier or harder? -----Original Message----- From: David Freeman [mailto:[EMAIL PROTECTED]] Sent: 13 October 2002 22:12 To: [EMAIL PROTECTED] Subject: RE: [PHP] A little help needed, I cant figure! > >Song Table: > >Song_id > >A_id > >Type > >Name > >Length > >Lyrics > >... > > > >That's my ideas on how to do it. There are many ways to do > it, though. > > > Totally agree with what John says. If the lyrics are long > (as I assume > they will be) then I'd probably hive the lyrics off into a table of > their own with as many records as needed to make up one > song. The song > table would then become: > > Song Table: > Song_id > A_id > Type > Name > Length > Lyric_id > > and have a lyrics table such as: > > Lyrics Table: > Lyric_id > sequence > text Hmm, just thinking about normalizing the data and I suspect that the song table will be insufficient if you have to take into account songs that are released as a single and then also released on an album. You may find, in that circumstance, that having lookup tables will help. One of these tables will contain artist ID's and associated song ID's and enable you to get singles for an artist. The other table would contain album ID's and song ID's and enable you to get songs for an album. Obviously, you can get much more complex queries going as well such as the number of times a particular song has been included on an album by an artist. This addition would also help with songs on compilation albums by multiple artists where you could drill down to a list of songs on a compilation album complete with the artist for each song. CYA, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php