Skip to content
Howard Hamilton edited this page Jan 18, 2016 · 2 revisions

These data models are specific to the club version of the Marcotti data schema.

The Clubs data model contains attributes that describe football clubs. This is a central data model because it is linked to match and match event models of the Marcotti schema.

Attribute Type Field Parameters Description
id Integer Unique ID of football club
name Unicode 60-char limit Name of the football club
country_id Integer Foreign Key (Countries): Country in which club resides
country Countries Reference to country object

The ClubFriendlyMatches data model inherits from the Matches data model and contains additional attributes related to friendly matches.

Attribute Type Description
id Integer Foreign Key (Matches): Unique ID of football match
home_team_id Integer Foreign Key (Clubs): Designated home team
away_team_id Integer Foreign Key (Clubs): Designated away team
home_team Clubs Reference to Club object
away_team Clubs Reference to Club object

The ClubLeagueMatches data model inherits from the Matches data model and contains additional attributes related to league matches.

Attribute Type Description
id Integer Foreign Key (Matches): Unique ID of football match
matchday Integer Matchday of the league competition
home_team_id Integer Foreign Key (Clubs): Designated home team
away_team_id Integer Foreign Key (Clubs): Designated away team
home_team Clubs Reference to Club object
away_team Clubs Reference to Club object

The ClubGroupMatches data model inherits from the Matches data model and contains additional attributes related to group stage matches.

Attribute Type Description
id Integer Foreign Key (Matches): Unique ID of football match
group_round GroupRoundType Name of the group stage round
group String Name of group, denoted as a letter or number
matchday Integer Matchday of the group phase of the competition
home_team_id Integer Foreign Key (Clubs): Designated home team
away_team_id Integer Foreign Key (Clubs): Designated away team
home_team Clubs Reference to Club object
away_team Clubs Reference to Club object

The ClubKnockoutMatches data model inherits from the Matches data model and contains additional attributes related to knockout stage matches. These matches may be a single match or one of a series of multiple matches.

Attribute Type Description
id Integer Foreign Key (Matches): Unique ID of football match
ko_round GroupRoundType Name of the knockout stage round
matchday Integer Matchday of the knockout tie (default 1)
extra_time Boolean Indicate match went to extra time (default False)
home_team_id Integer Foreign Key (Clubs): Designated home team
away_team_id Integer Foreign Key (Clubs): Designated away team
home_team Clubs Reference to Club object
away_team Clubs Reference to Club object

The ClubMatchLineups data model inherits from the Matches data model and adds the club attributes in order to link the players to the clubs participating in the match.

Attribute Type Description
id Integer Foreign Key (MatchLineups): Unique ID of match lineup record
team_id Integer Foreign Key (Clubs): Team of player in match lineup
team Clubs Reference to Club object

The ClubGoals data model inherits from the Goals data model and adds the club attributes in order to credit a specific team with the goal event.

Attribute Type Description
id Integer Foreign Key (MatchLineups): Unique ID of goal event record
team_id Integer Foreign Key (Clubs): Team credited with goal
team Clubs Reference to Club object

The ClubPenaltyShootoutOpeners data model describes the name of the club team that made the first kick in the match's penalty shootout.

Attribute Type Description
id Integer Foreign Key (PenaltyShootoutOpeners): Unique ID of football match
team_id Integer Foreign Key (Clubs): Team that opened the penalty shootout
team Clubs Reference to Club object