public.tournament
PK
id  
serial
NN
name  
character varying(150)
NN
start_date  
date
NN
end_date  
date
location  
json
description  
text
KEY
tournament_pkey
public.referee
PK
id  
serial
NN
first_name  
character varying(100)
NN
last_name  
character varying(100)
NN
nationality  
character varying(100)
KEY
referee_pkey
public.player
PK
id  
serial
NN
first_name  
character varying(100)
NN
last_name  
character varying(100)
NN
date_of_birth  
date
nationality  
character varying(100)
position  
character varying(50)
FK
team_id  
integer
KEY
player_pkey
IX
idx_player_team_id
public.standing
PK
id  
serial
NN
FK
tournament_id  
integer
NN
FK
team_id  
integer
NN
played  
integer
won  
integer
drawn  
integer
lost  
integer
goals_for  
integer
goals_against  
integer
points  
integer
KEY
standing_pkey
KEY
standing_tournament_id_team_id_key
IX
idx_standing_tournament_id
IX
idx_standing_team_id
public.team
PK
id  
serial
NN
name  
character varying(100)
NN
coach  
character varying(100)
founded_year  
integer
KEY
team_pkey
public.match
PK
id  
serial
NN
FK
tournament_id  
integer
NN
match_date  
timestamp without time zone
NN
round  
character varying(50)
status  
match_status
NN
KEY
match_pkey
IX
idx_match_tournament_id
public.match_player_stats
PK
id  
serial
NN
FK
match_id  
integer
NN
FK
player_id  
integer
NN
minutes_played  
integer
goals  
integer
assists  
integer
yellow_cards  
integer
red_cards  
integer
KEY
match_player_stats_pkey
KEY
match_player_stats_match_id_player_id_key
IX
idx_match_player_match_id
IX
idx_match_player_player_id
public.match_team
PK
id  
serial
NN
FK
match_id  
integer
NN
FK
team_id  
integer
NN
is_home  
boolean
score  
integer
KEY
match_team_pkey
KEY
match_team_match_id_team_id_key
IX
idx_match_team_match_id
IX
idx_match_team_team_id
public.match_referee
PK
id  
serial
NN
FK
match_id  
integer
NN
FK
referee_id  
integer
NN
role  
character varying(50)
KEY
match_referee_pkey
KEY
match_referee_match_id_referee_id_key
IX
idx_match_referee_match_id
IX
idx_match_referee_referee_id

Sport tournaments

Enum
public.match_status
Documentation for project XDM - sport tournaments
XDM - sport tournaments
Project
Name
XDM - sport tournaments
Diagram
Name
Detailed
Report
Generated
11/7/2026 | 12:50:34 AM
tables
Name
match
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
tournament_id
integer
Yes
match_date
timestamp without time zone
Yes
round
character varying
50
status
30
Yes
Default value
'scheduled'
Indexes
idx_match_tournament_id
Column name
tournament_id
Nulls last
Yes
Using
btree
Keys
match_pkey
Column in match_pkey
id
Name
match_player_stats
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
match_id
integer
Yes
player_id
integer
Yes
minutes_played
integer
goals
integer
Default value
0
assists
integer
Default value
0
yellow_cards
integer
Default value
0
red_cards
integer
Default value
0
Indexes
idx_match_player_match_id
Column name
match_id
Nulls last
Yes
Using
btree
idx_match_player_player_id
Column name
player_id
Nulls last
Yes
Using
btree
Keys
match_player_stats_pkey
Column in match_player_stats_pkey
id
match_player_stats_match_id_player_id_key
Column in match_player_stats_match_id_player_id_key
match_id
Column in match_player_stats_match_id_player_id_key
player_id
Name
match_referee
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
match_id
integer
Yes
referee_id
integer
Yes
role
character varying
50
Indexes
idx_match_referee_match_id
Column name
match_id
Nulls last
Yes
Using
btree
idx_match_referee_referee_id
Column name
referee_id
Nulls last
Yes
Using
btree
Keys
match_referee_pkey
Column in match_referee_pkey
id
match_referee_match_id_referee_id_key
Column in match_referee_match_id_referee_id_key
match_id
Column in match_referee_match_id_referee_id_key
referee_id
Name
match_team
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
match_id
integer
Yes
team_id
integer
Yes
is_home
boolean
Default value
false
score
integer
Indexes
idx_match_team_match_id
Column name
match_id
Nulls last
Yes
Using
btree
idx_match_team_team_id
Column name
team_id
Nulls last
Yes
Using
btree
Keys
match_team_pkey
Column in match_team_pkey
id
match_team_match_id_team_id_key
Column in match_team_match_id_team_id_key
match_id
Column in match_team_match_id_team_id_key
team_id
Name
player
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
first_name
character varying
100
Yes
last_name
character varying
100
Yes
date_of_birth
date
nationality
character varying
100
position
character varying
50
team_id
integer
Indexes
idx_player_team_id
Column name
team_id
Nulls last
Yes
Using
btree
Keys
player_pkey
Column in player_pkey
id
Name
referee
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
first_name
character varying
100
Yes
last_name
character varying
100
Yes
nationality
character varying
100
Keys
referee_pkey
Column in referee_pkey
id
Name
standing
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
tournament_id
integer
Yes
team_id
integer
Yes
played
integer
Default value
0
won
integer
Default value
0
drawn
integer
Default value
0
lost
integer
Default value
0
goals_for
integer
Default value
0
goals_against
integer
Default value
0
points
integer
Default value
0
Indexes
idx_standing_tournament_id
Column name
tournament_id
Nulls last
Yes
Using
btree
idx_standing_team_id
Column name
team_id
Nulls last
Yes
Using
btree
Keys
standing_pkey
Column in standing_pkey
id
standing_tournament_id_team_id_key
Column in standing_tournament_id_team_id_key
tournament_id
Column in standing_tournament_id_team_id_key
team_id
Name
team
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
name
character varying
100
Yes
coach
character varying
100
founded_year
integer
Keys
team_pkey
Column in team_pkey
id
Name
tournament
Description
Stores tournament metadata.
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
name
character varying
150
Yes
start_date
date
Yes
end_date
date
location
json
description
text
Keys
tournament_pkey
Column in tournament_pkey
id
relationships
Name
match_tournament_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in tournament
Column in match
tournament_pkey
id
tournament_id
Properties
Rerefential integrity - parent delete
Cascade
Referential integrity - parent update
No action
Name
match_player_stats_match_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in match
Column in match_player_stats
match_pkey
id
match_id
Properties
Rerefential integrity - parent delete
Cascade
Referential integrity - parent update
No action
Name
match_player_stats_player_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in player
Column in match_player_stats
player_pkey
id
player_id
Properties
Rerefential integrity - parent delete
Cascade
Referential integrity - parent update
No action
Name
match_referee_match_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in match
Column in match_referee
match_pkey
id
match_id
Properties
Rerefential integrity - parent delete
Cascade
Referential integrity - parent update
No action
Name
match_referee_referee_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in referee
Column in match_referee
referee_pkey
id
referee_id
Properties
Rerefential integrity - parent delete
Cascade
Referential integrity - parent update
No action
Name
match_team_match_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in match
Column in match_team
match_pkey
id
match_id
Properties
Rerefential integrity - parent delete
Cascade
Referential integrity - parent update
No action
Name
match_team_team_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in team
Column in match_team
team_pkey
id
team_id
Properties
Rerefential integrity - parent delete
Cascade
Referential integrity - parent update
No action
Name
player_team_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Optional
Key and columns
Key name
Column in team
Column in player
team_pkey
id
team_id
Properties
Rerefential integrity - parent delete
Set null
Referential integrity - parent update
No action
Name
standing_team_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in team
Column in standing
team_pkey
id
team_id
Properties
Rerefential integrity - parent delete
Cascade
Referential integrity - parent update
No action
Name
standing_tournament_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in tournament
Column in standing
tournament_pkey
id
tournament_id
Properties
Rerefential integrity - parent delete
Cascade
Referential integrity - parent update
No action
Lines
Line name
match_status-status
Other objects
Name
match_status
Type
Enum
Schema
public
Enum values
'scheduled',
'completed'
Notes
Name
Text1
Note

Sport tournaments