|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Database Development > Which are the keys within my table? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|