emorris1000
Registered User.
- Local time
- Today, 13:13
- Joined
- Feb 22, 2011
- Messages
- 125
I'm working on a new database which will need to regularly display a bunch of values that are derived from raw data in the database. Like, I have x and y and the form needs to show x/y. Usually the calculations are simple, occasionally they are more complex (like one requires a very nasty application of solver, but I'm not discussing that one here because it involves a lot of other factors.)
I've generally always maintained the attitude that you should dynamically calculate these and only generate them downstream to keep things simple/clean/pure/etc., as opposed to pre-calculating them and keeping them in the relevant table, as that violates rules of normality.
But I'm starting to work on a more advanced application of these values that would put these calculations into an already complex search query (complex enough that the query design wizard will crash if you look at them in any form other than SQL). So now I'm entertaining the idea of pre-calculating them, because in this case at least any efficiency is lost when trying to dynamically calculate them.
I'm curious if other people have internal logic they use for determining when/if they should pre-calculate values, or do they have hard rules to never do this?
I've generally always maintained the attitude that you should dynamically calculate these and only generate them downstream to keep things simple/clean/pure/etc., as opposed to pre-calculating them and keeping them in the relevant table, as that violates rules of normality.
But I'm starting to work on a more advanced application of these values that would put these calculations into an already complex search query (complex enough that the query design wizard will crash if you look at them in any form other than SQL). So now I'm entertaining the idea of pre-calculating them, because in this case at least any efficiency is lost when trying to dynamically calculate them.
I'm curious if other people have internal logic they use for determining when/if they should pre-calculate values, or do they have hard rules to never do this?