0% found this document useful (0 votes)
2 views1 page

DB Schema

The document outlines a database schema for a sports management system, detailing various entities such as roles, users, managers, referees, stadiums, clubs, teams, matches, and player statistics. Each entity includes attributes like IDs, names, and relevant statistics, which are interconnected through foreign keys. The schema supports functionalities like tracking player transfers, match actions, and community league memberships.

Uploaded by

podvalnikov0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

DB Schema

The document outlines a database schema for a sports management system, detailing various entities such as roles, users, managers, referees, stadiums, clubs, teams, matches, and player statistics. Each entity includes attributes like IDs, names, and relevant statistics, which are interconnected through foreign keys. The schema supports functionalities like tracking player transfers, match actions, and community league memberships.

Uploaded by

podvalnikov0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

roles users managers referees stadiums

id serial 1 1 id serial 1 1 id serial 1 id serial 1 id serial

role_name varchar username varchar name varchar name varchar name varchar

email varchar surname varchar surname varchar founded date

password varchar nationality varchar nationality varchar location varchar


clubs
* role_id serial age integer age integer capacity integer
id serial 1
budget numeric
name varchar

founded date clubs_stats_histories players gameweeks

stadium_id serial * clubs_stats id serial 1 id serial 1 1 id serial 1

manager_id serial * id serial * club_id serial name varchar week_number integer


* club_id serial played integer surname varchar deadline datetime

played integer wins integer price numeric


teams
wins integer draws integer position varchar
id serial 1 players_weeks_stats
draws integer losses integer health_status varchar
name varchar game_week_id serial *
losses integer goals_for integer * club_id serial
points integer * player_id serial
goals_for integer goals_against integer
user_id serial * goals integer
goals_against integer goals_difference integer
available_transfers integer teams_ranks_changes assists integer
goals_difference integer points integer
game_week_id serial * minutes integer
points integer season_from integer
* team_id serial own_goals integer
matches season_to integer
change_from integer yellow_cards integer
id serial 1
teams_players_connection change_to integer red_cards integer
date date
player_id serial * teams_weeks_stats saves integer
time time
* team_id serial game_week_id serial * clean_sheets integer
home_club_id serial * teams_gameweeks_line_ups
is_captain bool * team_id serial
guest_club_id serial * game_week_id serial *
is_starter bool points integer
referee_id serial * * team_id serial matches_line_ups

player_id serial * * match_id serial

matches_actions news is_captain bool * player_id serial


captain_choices
id serial id serial is_starter bool is_starter bool
game_week_id serial *
* match_id serial title varchar
team_id serial *
player_id serial * content text
player_id serial * community_league_members community_league_invites
* club_id serial * match_id serial
* community_league_code_name varchar id serial
minute integer
* team_id serial * community_league_code_name varchar
team_histories action varchar
community_leagues is_creator bool * from_user_id serial
team_id serial *
code_name varchar 1 * to_user_id serial
season_from integer
transfers name varchar is_accepted bool
season_to integer
id serial invite_only bool
points integer
player_id serial *
rank integer
game_week_id serial *

type varchar

player_price_changes

player_id serial *

game_week_id serial *

change_from numeric

change_to numeric

You might also like