|
Question : Soccer/Football Database Design
|
|
Hello all,
this is more of a database question as opposed to a specific access question but I hope someone is still able to help me?
I am putting together a little database of my local soccer/football team. All i want to store is information about each match and player information. Some of my queries I would like would be how many games a player has played, scored, assisted etc..
I am just struggling on table setup and how I would create the queries. Im mainly unsure if i should store the player stats in the player table or create queries that would extract the information from the match tables?
Any help would be greatly appreciated.
Many thanks in advance, Alan.
|
|
Answer : Soccer/Football Database Design
|
|
This should get you started:
tblTeams --------- TeamID <-- PK OtherFields
tblPlayers ---------- PlayerID <-- PK TeamID <-- FK to tblTeams. I assume each player can only have one team? OtherFields
tblGames (this setup requires 2 records for each game) -------- GameID <-- PK TeamID <-- FK to tblTeams HomeOrAway OtherFields
tblPlayerAction --------------- PlayerActionID <-- PK, autonumber PlayerID <-- FK to tblPlayers GameID <-- FK to tblGames ActionType <-- could be a lookup OtherFields
|
|
|
|