-
Notifications
You must be signed in to change notification settings - Fork 0
/
Database Schema
202 lines (184 loc) · 4.61 KB
/
Database Schema
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
Please note, you'll see that most stats and tendencies are missing, this is because I'm debating where I want to place them, lol.
Players Table:
- PlayerID (Primary Key)
- First Name
- Last Name
- Order (F.Last or First Last or L. First or Last First)
- Nickname
- BirthdateWithoutYear
- YearBorn
- Year (What player's career year it represents to.)
- DRAFT (Year/Round/Pick)
- Childhood Team
- Preferred Team
- Drafted Team
- Play for Winner
- Play for Money
- Play for Fun
- Play for Time
- Loyalty
- Force Non-Starter
- Play Initiator
- Dominant Hand
- Nationality
- College
- Is Draft Prospect (Bool)
- BodyID (Foreign Key referencing Body table)
- CommentaryId (Foreign Key referencing Commentary table)
- JerseyID (Foreign Key referencign Jersey table)
Jersey Table:
- Jersey ID
- Jersey Nickname
- Jersey Number
- Shirt Tucked or Untucked
- Shirt Length
- Short Length
- Sock Type
- Shoes
- Sponsor
- YearIntroduced
Body Table:
- BodyID (Primary Key)
- FaceID (Foreign Key)
- Height
- Wingspan
- Muscle
- Weight
- ShoulderSize
- BicepSize
- ForearmSize
- BellySize
- PecSize
- PecShape
- ButtSize
- ButtShape
- LegSize
- GastrocnemiusSize
- HandSize
- HasTattoos (Boolean)
Face Table:
- FaceID
- Mural ID
- Portrait ID
- Action Shot ID
Commentary Table:
- CommentaryId (Primary Key)
- Phrases (List of PhraseKeys as a comma-separated string)
Phrases Table:
- PhraseKey (Primary Key)
- Phrase (Text of the commentary phrase with placeholders for dynamic content)
Teams Table:
- TeamID (Primary Key)
- FranchiseID (To connect all same franchise teams in some way)
- Name
- Year
- Year of Origin
- City
- Arena
- Overall
- ChampionshipsWon
- ConferenceFinals
- LastPlayoffAppearance
- DebutDate
- JerseyID
- OverridesPreferredJersey
- CommentaryID
- Players (List of PlayersID sepparated by comma)
Coaches Table:
- CoachID (Primary Key)
- Name
- Birthdate
- YearsActive
- ChampionshipsWon
- CommentaryId
Referees Table:
- RefereeID (Primary Key)
- Name
- Birthdate
- YearsActive
- CommentaryId
- TechnicalFoul_Tendency
- DriveFoul_Tendency
- PostFoul_Tendency
- OverTheBack_Tendency
- Travelling_Tendency
- ReachinFoul_Tendency
- BlockingFoul_Tendency
- JerseyID (Foreign Key referencing Jerseys table)
Games Table:
- GameID (Primary Key)
- SeasonID (Foreign Key referencing Seasons table)
- TeamAID (Foreign Key referencing Teams table)
- TeamBID (Foreign Key referencing Teams table)
- CourtID (Foreign Key referencing Courts table)
- RefereeID (Foreign Key referencing Referees table)
- Date
- Round (PreSeason/Season/1st round/2nd round/ Conference Semi-Finals/Conference Finals/Finals/Post Season/Special)
- TeamAScore
- TeamBScore
- MVP (Foreign Key referencing PlayerID)
Courts Table:
- CourtID (Primary Key)
- CourtName
- Location
- SeatingCapacity
Transactions Table:
- TransactionID (Primary Key)
- PlayerID (Foreign Key referencing Players table)
- CoachID (Foreign Key referencing Coaches table)
- TeamFromID (Foreign Key referencing Teams table)
- TeamToID (Foreign Key referencing Teams table)
- TransactionType
- Date
- Details
Seasons Table:
- SeasonID (Primary Key)
- Year
- RegularSeasonStartDate
- RegularSeasonEndDate
- PlayoffStartDate
- PlayoffEndDate
- Games (List of GameID sepparated by comma)
- Awards (List of AwardID sepparated by comma)
Awards Table:
- AwardID (Primary Key)
- Name
- Description
- PlayerID (Foreign Key referencing Players table)
- SeasonID (Foreign Key referencing Seasons table)
Game Details Table:
- GameDetailID (Primary Key)
- GameID (Foreign Key referencing Games table)
- PlayerID (Foreign Key referencing Players table)
- PlayerRating (Points + (OffensiveRebounds + Blocks + Steals+Assists)*2 / PlaysParticipated)
- FG
- FGA
- FT
- FTA
- 2PT
- 2PA
- 3Pt
- 3PA
- 4PT
- 4PA
- 5PT
- 5PA
- Blocks
- Steals
- Rebounds
- Defensive Rebounds
- Offensive Rebounds
- Assists
- MinutesPlayed
- PlusMinus
Leagues Table:
- LeagueID (Primary Key)
- LeagueName
- Year
- Description
- NumberOfTeams
- Country
- EstablishedYear
- Rules
- SeasonFormat
- Teams (List of TeamsID sepparated by comma)