Help With Baseball Stat Tracking


#1

I need to be able to input stats manually via a web page, and then have the database updated with the total stats for a season, having them all sorted by year, like the back of a baseball card. I need to make it so that each team has a stats page with their players ERA, Batting Avg, etc for the season. What would I need to study in order to do this?


#2

You need to figure out:

  • how to best structure your data (do you want a record in your database for every at-bat? and calculate the batting average from there? or just a copy of each player’s batting average?)

  • how to set up a database of teams, players, and which players are on which teams

  • how to create the web interface to this

  • whether your web interface has any policy restrictions (like a user has to sign in to see his/her own team in detail)

Those are the major chunks of the problem – people here can help with the details of any particular one, but it’s a decent-sized task overall and nobody can just tell you how easily.


#3

I think I can work myself through most of it, im just a little confused as to how to load the data on to a teams page, would I need a php page that displays the variables, or will I have to have an html page generated and everytime I update, wipe it clean and re-write new data? Any helpful beginners database tutorial suggestions are welcomed.


#4

You can do either, but when you are on a complex site with many variables to take care of, having embedded PHP is the best way to do it. Whenever I use XML (much slower than databases) I generate static pages, but database queries are fast enough that I don’t bother with static pages.