sirflex10 Posted December 19, 2011 Share Posted December 19, 2011 I'm new to php & mysql and I'd like to create a sports statistics database to track my flag football teams player stats. Is there anything wrong with just creating one table with player name, player id, touchdowns, flag grabs, interceptions, sacks, etc. Can someone please explain the logic behind creating multiple tables? Thank you in advance Quote Link to comment Share on other sites More sharing options...
requinix Posted December 19, 2011 Share Posted December 19, 2011 There are a number of reasons for multiple tables, many of which are good (but some of which aren't). Normalization is a good one as it helps prevent data duplication and improve potential searches, while partitioning is mostly just for keeping "groups" of data in separate locations for cleanliness. Here's a question for you: Of all the player data you want to track, is anything of it related to something besides the player him-/herself? Maybe you want to track some of the numbers per-game and not throughout their entire "career"? Quote Link to comment Share on other sites More sharing options...
sirflex10 Posted December 22, 2011 Author Share Posted December 22, 2011 Thank you for your quick reply. As of know I only want to track "Career" stats. Below is an example of the table that I have in mind. player_id, player_name, points, assist, rebounds, blocks, turnovers Is there any benefit of making multiple tables or is it ok to use one table for the info above? Quote Link to comment Share on other sites More sharing options...
fenway Posted December 22, 2011 Share Posted December 22, 2011 Using one table is just plain lazy. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.