hokiewalrus
Registered User.
- Local time
- Today, 08:22
- Joined
- Jan 19, 2009
- Messages
- 50
I've been pulling my hair recently with table design with regards to values that are sometimes based on other data but sometimes not.
The problem is this: the company I'm consulting for enters in the hours each employee worked on each job. The total hours for the day is sometimes accepted as is, sometimes overridden by a manager. At the end each week, another manager looks at those numbers and sometimes accepts them and sometimes overrides either the value for a day or the total for the week.
Ethical implications and actual value aside, this is what they do and they aren't going to change.
The real issue arises when a change gets made all the way down at the hour level, which sometimes changes the total for the day, which in turn then sometimes changes the value for the week.
Short of storing a calculated total with an "override" boolean flag and tons of recalculate routines that get called when needed, I'm not sure what the best approach is here.
I've already given myself a concussion banging my head against the wall trying to get them to base their business in some semblance of reality, at this point I just have to try and give them what they want.
What is the best way to handle occasionally calculated values?
The problem is this: the company I'm consulting for enters in the hours each employee worked on each job. The total hours for the day is sometimes accepted as is, sometimes overridden by a manager. At the end each week, another manager looks at those numbers and sometimes accepts them and sometimes overrides either the value for a day or the total for the week.
Ethical implications and actual value aside, this is what they do and they aren't going to change.
The real issue arises when a change gets made all the way down at the hour level, which sometimes changes the total for the day, which in turn then sometimes changes the value for the week.
Short of storing a calculated total with an "override" boolean flag and tons of recalculate routines that get called when needed, I'm not sure what the best approach is here.
I've already given myself a concussion banging my head against the wall trying to get them to base their business in some semblance of reality, at this point I just have to try and give them what they want.
What is the best way to handle occasionally calculated values?