Skip to content

Schema Explained

Matthew Pope edited this page Mar 21, 2021 · 4 revisions

Schema

Table of Contents

The schema is straight forward and an Entity Relationship diagram can be found here, however the column names are a bit cryptic. The following expands abbreviations found in the tables and explains the role of some constant tables.


player_game_log

Column Description
season_year The specific season key. Ex: 1998-99
player_id Foreign key to the player table
team_id Foreign key to the team table
game_id Id of the game
game_date Date of the game
matchup Opposing team
wl Win/Loss
min Minutes played
fgm Field goals made
fga Field goals attempted
fg_pct Field goals percentage
fg3m Field goal 3pts made
fg3a Field goal 3pts attempted
fg3_pct Field goal 3pts percentage
ftm Free throws made
fta Free throws attempted
ft_pct Free throws percentage
oreb Offensive rebounds
dreb Defensive rebounds
reb Total rebounds
ast Assists
tov Turn overs
stl Steals
blk Blocks
blka Block attempts
pf Personal fouls
pfd Personal fouls defense
pts Points
plus_minus Box plus minus
nba_fantasy_points Fantasy point total
dd2 Double-doubles
td3 Triple-doubles

event_message_type

The event_message_type table is an enum to filter types of plays in the play_by_play table. The play_by_play wiki has more information on how to use it. Here is it's definition:

id string
1 FIELD_GOAL_MADE
2 FIELD_GOAL_MISSED
3 FREE_THROW
4 REBOUND
5 TURNOVER
6 FOUL
7 VIOLATION
8 SUBSTITUTION
9 TIMEOUT
10 JUMP_BALL
11 EJECTION
12 PERIOD_BEGIN
13 PERIOD_END
18 UNKNOWN
Clone this wiki locally