I am creating a database for a Basketball Season. At this point, I am keeping it simple, and storing tables:
-League id[PK], name->(NBA, NCAAM, etc)
-Year id[PK], league_id[FK], year->(2012-2013, 2011-2012, etc)
-Team id[PK], league_id[FK], name->(Bulls, Lakers, Etc)
-Game id[PK], home_team[FK], away_team[FK]
-Score id[PK], game_id[FK], home_score, away_score
My question is about table structure. I am somewhat new to sql, but I want to be able to make calcuations based on database info. For example:
Team A on the road, playing team B, where team A's road score avg is x and team B's home score average is y... and so on
Anything you see that screams DONT DO IT THAT WAY? Just wanted you guys to take a quick look.
Eventually would like to develop a cross sport DB similar to this:
http://www.bc.edu/content/dam/files/schools/cas_sites/cs/local/bach/2008/08LawrenceChang.pdf
But want to start here to get a base scraping algorithm, and some basic stats to start out. Let me know whatcha think. Thanks a bunch!