Database design for a little soccer league
From: Mariano C. <mariano.calandra_at_gmail.com>
Date: Sun, 20 Mar 2011 09:53:48 -0700 (PDT)
Message-ID: <884e5d23-9ab0-487c-a21c-12e2ff0ab2b8_at_x11g2000yqc.googlegroups.com>
I'm developing an application about little soccer league, i need to track teams, team's players, match, game's events (goal, red card, yellow card, ...), player who took part in a match.
Date: Sun, 20 Mar 2011 09:53:48 -0700 (PDT)
Message-ID: <884e5d23-9ab0-487c-a21c-12e2ff0ab2b8_at_x11g2000yqc.googlegroups.com>
I'm developing an application about little soccer league, i need to track teams, team's players, match, game's events (goal, red card, yellow card, ...), player who took part in a match.
I have 5 tables:
team (stores teams information. PK: id)
player (stores players information. PK: id; FK: team_id)
matches (stores information about match, this is a joining table among
team and team. PK: id; FK: home_team_id, away_team_id)
events (stores game's events for given match and who player was
responsable for this. PK: id; FK: match_id, player_id)
lineup (stores players who took part in a given match. PK: id; FK:
player_id, match_id)
Does it seems correct?
This is the DB with the PK and FK (hope that link is working):
http://imgclub.org/images/caressarev.jpg
Received on Sun Mar 20 2011 - 17:53:48 CET