Hey Guys,
Im designing a databse for my cricket club to record the results of matchs which will eventually be used in a website so that users can query the databse and view statistics.
My question - is there a best practice concerning what should be put in a table and what should be generated dynamically?
For example Every player will have their own statistics (avg run rate, high score etc) and every cricket season will also have its own statistics ( season avg run rate, season high score etc) and every match will also have its own statistics (game avg runs, game high score, etc).
So far I have included these statistics as attributes (columns) in my tables and thought that I would have a series of triggers that would fire and update the stats when new data is entered once a week after the game and then on the website when a user wishs to view a statistic instead of calculating them I could just do a simple select from a table.
Of course the alternative is that te statistics are calculated when the user requests them - this seems like it would be processor heavy to me.
Is there a best practice.
Thanks in advance.
Jizznit