GitHub Spotlight - sport_db.Football - Alternative SQL Football Schema w/ Diagrams

76 views
Skip to first unread message

Gerald Bauer

unread,
Dec 23, 2014, 5:41:48 AM12/23/14
to open...@googlegroups.com
Hello,

I've stumbled over another GitHub project called sport_db.Football
by Phuong Nguyen (aka milkysunshine91) that documents and includes a
database schema for football. Tables and views include:

- nationality
- country
- city
- position
- league
- team
- player
- season
- game
- scores
- team_league_season
- scorerrank (view)
- scores_for_game (views)


Example:

create table football.game
(
id bigint not null auto_increment,
home_team_id bigint not null references football.team(id),
away_team_id bigint not null references football.team(id),
season_id bigint not null references football.season(id),
league_id bigint not null references football.league(id),
game_date date,
game_day tinyint,
primary key (id)
);

create table football.scores
(
id bigint not null auto_increment,
game_id bigint not null references football.game(id),
player_id bigint not null references football.player(id),
team_id bigint not null references football.team(id),
own_goal tinyint default 0,
minute tinyint,
primary key (id)
);

If you're looking for an alternative SQL schema check it out.

Cheers.

[1] github.com/milkysunshine91/sport_db.Football
Reply all
Reply to author
Forward
0 new messages