Hello, I`m doing a database in MySQL to catalog cds, and i`m not sure if my table structure is the best way to do it:
Artist Table Artist_Id int unsigned not null auto_increment primary key Name char(120) // Artist or Band Name Country char(30) // Artist Or Band Country Members char(255) // Band Members Biography text // Artist or Band History CDS Table CD_Id int unsigned not null auto_increment primary key Artist_Id int unsigned not null Title char(150) // CD Title Style char(150) // CD Style Year year(4) // CD Release Year Song Table CD_Id int unsigned not null Position tinyint // Song position on cd Name char ( 255 ) // Song Name length char(10) // Song Length lyric text // Song Lyric Is it the best structure and relationship for my database? Some exemples If i try to find the a artist name i can search for artist name in artist table, but if i want to know what cds a artist got? SELECT * from CDS WHERE Artist_Id = SOMENUMBER but if i don`t know the artist id then i need to do a search for the id first? So is not better use artist name to my primary key? And in same way use CD title as primary key in cd table and in song table? But it's not a waste of space?? I`m a bit new in database so sometimes i get a bit confude about structure and my frontend program will be a java gui to serch and insert things in database so i`m trying to make easy as possible. Thank You. ------------------------------------------ Use o melhor sistema de busca da Internet Radar UOL - http://www.radaruol.com.br --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php