samona Posted January 8, 2010 Share Posted January 8, 2010 Hi, I was wondering if I could get some advice/comments/critiques on the database below. I want to make sure I'm going about this database correctly. Thanks. CREATE TABLE IF NOT EXISTS `Artists` ( `ArtistID` mediumint( unsigned NOT NULL auto_increment, `ArtistName` varchar(255) default NULL, `ArtistNotes` varchar(255) default NULL, `ArtistLink` varchar(255) default NULL, PRIMARY KEY (`ArtistID`) ) ENGINE=MyISAM; CREATE TABLE IF NOT EXISTS `Tracks` ( `TrackID` mediumint( unsigned NOT NULL auto_increment, `TrackTitle` varchar(255) default NULL, `TrackNumber` varchar(255) default NULL, `TrackLength` varchar(255) default NULL, `TrackCategory` varchar(255) default NULL, PRIMARY KEY (`TrackID`) ) ENGINE=MyISAM; CREATE TABLE IF NOT EXISTS `Categories` ( `CategoryID` mediumint( unsigned NOT NULL auto_increment, `CategoryDescription` varchar(255) default NULL, PRIMARY KEY (`CategoryID`) ) ENGINE=MyISAM; CREATE TABLE IF NOT EXISTS `Recordings` ( `RecordID` mediumint( unsigned NOT NULL auto_increment, `RecordTitle` varchar(255) default NULL, `RecordArtist` varchar(255) default NULL, `RecordCategory` varchar(255) default NULL, `RecordLabel` varchar(255) default NULL, `RecordNotes` varchar(255) default NULL, `RecordFileLocation` varchar(255) default NULL, `RecordDate` varchar(255) default NULL, PRIMARY KEY (`RecordID`) ) ENGINE=MyISAM; Quote Link to comment https://forums.phpfreaks.com/topic/187755-advice-about-database-music-structure/ Share on other sites More sharing options...
aebstract Posted January 8, 2010 Share Posted January 8, 2010 Here's the problem, and it's not necessarily a problem with your setup: We don't know what you're trying to achieve with this database. You can structure a database several ways and each way be just as good as the other, it really just depends on how you're gonna be using it and what you're gonna be doing with it. Quote Link to comment https://forums.phpfreaks.com/topic/187755-advice-about-database-music-structure/#findComment-991294 Share on other sites More sharing options...
samona Posted January 8, 2010 Author Share Posted January 8, 2010 Thanks for the reply. Basically what I want to do is set up a website with information about artists, thri music, and their bios. People should be able to search for singers by name, by song, and search for music by category. I'm not sure if I'm making it too complicated. Quote Link to comment https://forums.phpfreaks.com/topic/187755-advice-about-database-music-structure/#findComment-991299 Share on other sites More sharing options...
aebstract Posted January 8, 2010 Share Posted January 8, 2010 I think in this situation I would set it up somewhat similar to how you have it. I would have 3 tables: artist info, albums, tracks. I'm not sure what you're using "categories" for, but I think it could be used as a column in your albums tables (If I am thinking of this correctly) Inside albums, I would have a column that refers to an artist id and in the tracks I would have a column to reference to an album id. That way you can keep everything tied together. Hope this helps a bit! Quote Link to comment https://forums.phpfreaks.com/topic/187755-advice-about-database-music-structure/#findComment-991322 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.