Re: Database design for a little soccer league
Date: Mon, 21 Mar 2011 15:07:37 -0700 (PDT)
Message-ID: <e56cb029-5154-46ec-b12d-24b711cea318_at_b13g2000prf.googlegroups.com>
On Mar 21, 3:53 am, "Mariano C." <mariano.calan..._at_gmail.com> wrote:
> 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