RSS Forums RSS
Please support our Database Design advertiser: Programming Forums

Can anyone help me here!

Join Date: Jan 2005
Location: United Kingdom
Posts: 13
Reputation: Stewart is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
Stewart's Avatar
Stewart Stewart is offline Offline
Newbie Poster

Re: Can anyone help me here!

  #2  
Jun 16th, 2005
Okay, first thing when designing a database is to know what it is you are looking to do. You are looking to create a music database so we need to understand all the different entities used in order to model our database. Entities are the objects that we simulate, they can be physical items such as musical bands and abstract items such as genres. Each entity you can identify is a way of identifying each table necessary by default for your database. Entities are the basic naming part of a group and then, under entities, we have their properties which form our fields i.e. a band's name, year formed, year split etc. are all properties.

So, when we think about it the following are our entities:
  • Artist
  • Song
  • Genre (Rock, Pop, Jazz, etc.)
  • Format (Cassette, LP, CD, etc.)
  • Record Company

So, we have 5 tables to begin with. Now, when we look at some of these we realise that more than one artist can sing a song and one song can be song by many artists. Therefore we have a many-to-many relationship. This can only mean we need a new table to simulate this. So, we add a new table for artists to songs. Record companies, likewise, can form a many-to-many relationship with artists. We need a table for this join. We keep doing this until we are satisfied all our relationships are correct.

For our record company we'll need their name, address, phone number, email, etc. We don't need the bands that come under their umbrella - that's done in our joining table.

I don't have time to go much further into this in detail but I hope that can you a start in where to look. The keyword in all of this is normalization - search the web; there's loads of tutorials on this.
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 11:55 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC