title: What is the best approach to store data for the box score of a sporting event?
body: <p>I'm fairly new to MySQL (and databases as a whole) so I am not sure of the best approach to store data like this.</p>
  
  <p>I want to store statistical data for a sporting event, we are going to start with ice hockey. Each player has their career stats, but I also have boxscores for each game (we want to provide gamesheets to the players at the end of each game). </p>
  
  <p>I have a schedule table that contains the teams involved, date, and gameid for each event. I also have a players table that links their identity to a player id. </p>
  
  <p>These are the two approaches I have thought of so far:</p>
  
  <ol>
  <li><p>Use a stored procedure to create a table for every
  game on the schedule, and within that table, store all the player
  ids, and the stats for that particular game. When a scoring play occurs, it alters the table data for the current-game table and the career-stats table for that player.</p></li>
  <li><p>Or is it better to create a single 'game-score' table and record every scoring
  play (goal, penalty, etc.) onto that table using the gameid &amp;
  playerid as reference?</p></li>
  </ol>
  
  <p>The first approach could get messy really quick if we projected to have 100 matches in a season (individual game stats would be removed at seasons end, and then long term stats are retained)</p>
  
  <p>The second approach could end up with a really long table really quickly which might prove slow to query as it continues to grow.</p>
  
  <p>I am leaning towards the second approach, but would like to hear some input if possible. Or maybe I am taking the completely incorrect approach to this and would love to have someone send me down the right path. Any help is greatly appreciated.</p>