View Full Version : Tables - Help!!


Kenza
11-27-2009, 12:46 AM
Hi
I wonder if anyone can help. One of my students is trying to create a small database for a football club. He has created 4 tables: Players, Fixtures, Venues and coaches. He has linked players, venue and coaches to fixtures. But by doing it this way it means he has only 1 player in a fixture which is wrong. He needs a 5th table but don't know which one. To summarise: in one fixture you have many players, one player can play in many fixtures, one coach can coach many fixtures and one venue can be used in many fixtures. Could you pls help. I am looking forward to your reply.

John Big Booty
11-27-2009, 01:25 AM
You'll need a table structure something like;

TBL_Fixture
RoundID (PK)
RoundNumber
Date
Time
AwayTeamID (FK)
HomeTeamID (FK)
GroundID (FK)

TBL_Teams
TeamID (PK)
TeamName
CoachID (FK)

TBL_Players
PlayerID (PK)
PlayerName

TBL_Roster
TeamID (FK)
PlayerID (FK)

TBL_Coaches
CoachID (PK)
CoachName

TBL_Ground
GroundID (PK)
GroundName

Kenza
11-30-2009, 05:35 AM
Hi John, thank you for your suggestion. Tried it but did not work.
Anything else you could suggest. Thank you for your kind help.

John Big Booty
11-30-2009, 11:41 AM
Hi John, thank you for your suggestion. Tried it but did not work.
Anything else you could suggest. Thank you for your kind help.

In what way did it not work? Which part in particular didn't work? Please explain step by step what you are trying to achieve.

boblarson
11-30-2009, 11:48 AM
Hi John, thank you for your suggestion. Tried it but did not work.
Remember - specifics can be much more useful than general statements.

Which statement is better?

A) Doctor, I have an ache and it really hurts.

B) Doctor, my third finger on my right hand aches and it really hurts. I was playing baseball yesterday and the ball hit my hand.