PDA

View Full Version : database design need help


bbmak
08-13-2005, 06:27 AM
Hi:
I have make an lyric databse,
the structure is like that

table: artist
artist_id (int)
name (varchar)
gender (varchar)
region (varchar)

table: lyric
lyric_id (int)
artist_id (index)
song_title (varchar)
lyric (text)

these 2 tables only for lyric for single artist.

As you music lovers know, sometime artists sing some songs with other artists. Do you know how should I design another table to store those lyrics?

Also please describe the way of sorting them?

raf
08-13-2005, 01:40 PM
your design should be

table: artist
artist_id (int)
name (varchar)
gender (varchar)
region (varchar)

table: lyric
lyric_id (int)
song_title (varchar)
lyric (text)

table:artist_lyric
artist_id (int)
lyric_id (int)


Each artist-lyric combination gets one record
If you then have 5 artists collaborating on one song, then you'll have five records for that lyric inside artist_lyric.