Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old May 5th, 2003, 09:09 AM
spdevshed spdevshed is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Posts: 22 spdevshed User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question database design comments appreciated

Hi All

I'm working on a site for a friend and they want to include a discography of music releases. They need to enter details such as:

Artist
Album Name
Track Names (linked to short excerpt)
etc

Is it better to have two tables linked via an ID (possibly album name). One table for Artist, Album etc and the other linked to this one via the Album name with the track names and links to the mp3's. Is it complicated to add/delete from multiple tables. Is this the best way of doing it?

Reply With Quote
  #2  
Old May 5th, 2003, 11:45 AM
imbrokn imbrokn is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2001
Location: NJ
Posts: 428 imbrokn User rank is Corporal (100 - 500 Reputation Level)imbrokn User rank is Corporal (100 - 500 Reputation Level)imbrokn User rank is Corporal (100 - 500 Reputation Level)imbrokn User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 34 m 8 sec
Reputation Power: 10
Send a message via AIM to imbrokn
you would definitly want to use multiple tables. Maybe even three.

tblArtist(artistID, ArtistName, Label) whatever you want for attributes

tblAlumbs(AlbumID, AlbumName, ArtistID, Date) again more attributes you want

tblTracks(TrackID, TrackName, AlbumID, ArtistID, Duration, TrackNumber ) ArtistID isn't required, but i think a fully normalized schema would include this here.

I'm by no means a database guru, but I believe this is the fully normalized way to do it. Maybe someone else has more input.

Reply With Quote
  #3  
Old May 5th, 2003, 10:28 PM
jharnois's Avatar
jharnois jharnois is offline
mod_dev_shed
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Sep 2002
Location: Atlanta, GA
Posts: 14,282 jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 2 Days 16 m 26 sec
Reputation Power: 744
imbrokn's table layout looks good to me except I don't think you need to have the ArtistID in the Tracks table b/c you can move through the Albums table to get it. The exception to this would be if you plan on using it when you have a Various Artists disk instead of using the artist "Various".

I've done this using the suggested layout with my modifications and it worked very well.

Reply With Quote
  #4  
Old May 6th, 2003, 06:16 AM
spdevshed spdevshed is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Posts: 22 spdevshed User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile

Thanks for the suggestions. Much appreciated.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > database design comments appreciated


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway