Jump to content

Advice about database Music Structure


samona

Recommended Posts

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;

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!  ;)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.