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

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old March 17th, 2005, 09:39 AM
GolfingTea GolfingTea is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 1 GolfingTea User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 50 sec
Reputation Power: 0
Which are the keys within my table?

Hi everyone, I’m attempting to setup a database for my little snooker club and was wondering if anyone could help me determine which attributes are the keys for this relationship? I really want to make sure all the keys are right before I start normalisation...



Note: coachId and coachName are membership no and last name of the coaching player whereas PlayerId, PlayerName, and playerRanking are the number, last name and ranking position of the person being coached.



Table:



Coaches(coachId, CoachName, PlayerID, PlayerName, PlayerRanking, StartDate, EndDate, TourID, TourName)



Heres full dependences Ive come up with…



{PlayerId, StartDate, EndDate} > coached

PlayerId > {PlayerName, PlayerRanking }

{PlayerId, TourId } > coachId

{PlayerId, TourId } > coachName

{PlayerId, StartDate, EndDate} > coachName

TourID > TourName

CoachId > CoachName

{ PlayerId, TournID } > StartDate

{ PlayerId TourID }> EndDate



Any help is much appretiated



Cheers Guys,

GolfingTea.

Reply With Quote
  #2  
Old March 17th, 2005, 12:57 PM
Anibal Anibal is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 176 Anibal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 4 h 20 m 48 sec
Reputation Power: 4
Hey GolfingTea!

For what I understood...You would have:

Coaches
CoachID
CoachName

Players
PlayerID
PlayerName
PlayerRanking
CoachID

Tours
TourID
StartDate
EndDate

ToursPlayers
TourID
PlayerID

Attributes in blue are the Pkey of the table
Attributes in gray are simple fields of the table
Attributes in red are Fkeys

I didn't understand much your dependencies...so Here're the ones I came up with (a --> b means you can determin the value of b, knowing a):

CoachID --> CoachName (and other coach personal data)
PlayerID --> PlayerName, PlayerRanking (and other player personal data)
TourID --> StartDate, EndDate (this attributes are independen from the player)

Since you can have many Players going to many tours, you may have a ToursPlayers table to know what players went to what tours. The Primary key is formed by both attributes!

Good Luck!

Anibal.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesDatabase Development > Which are the keys within my table?


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 3 hosted by Hostway