I am planning on using this SQL schema to store/generate statistics and player data for various sports. I wanted to keep it as agnostic as possible, but given that each sport has different metrics for scoring and gameplay, I had to break it up at the end.
There are two "red flags" in there:
Any time you name a table with the value of what should be a foreign key's value, you have almost certainly got a problem:
These should be merged to GamePerformance
and a foreign key added to League
. If there's no such thing as an "assist" in NCAAB (the only difference between the tables), just make it null able.
You should fm do thus because:
Remember:
Design your schema with these principles in mind and your system will be easier to build and maintain.