[AccessD] Programming

Andy Lacey andy at minstersystems.co.uk
Fri May 13 09:18:15 CDT 2005


Funnily enough I was thinking of a payroll system as a good example of this.
'Net Pay' is a calculated figure but who in their right mind would write a
payroll system which did not store it?

"Would you please reprint my last December's payslip?"
"Couldn't possibly do that the tax caculation has changed since then."

Ok, it's an extreme instance but it illustrates the point that it'd be
pretty rash to adopt the position of "never store a calculated value".

--
Andy Lacey
http://www.minstersystems.co.uk



--------- Original Message --------
From: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
To: 'Access Developers discussion and problem solving'
<accessd at databaseadvisors.com>
Subject: RE: [AccessD] Programming
Date: 13/05/05 13:37

>
> I agree with most of what the others say.
>
> Sometimes it is very expensive (resource wise) to calculate a value.  I
> store the values in this situation.
>
> Another is when you have to store a value as it was calculated at that
time
> (unless you store the values used to make the calculation).  We have an
app
> that calculates deducts on payroll.  There are many places in the system
> where the parameters used to calculate the value can change.  But they do
> not want the value to be recalculated unless they manually cause a
> recalculation.  For that reason, the value is stored in the database.
>
> Bobby
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Griffiths,
> Richard
> Sent: Friday, May 13, 2005 3:50 AM
> To: AccessD
> Subject: [AccessD] Programming
>
>
> Hi Group
>
> A general programming question.  Would you ever store calculated values in
a
> table.  My example is this...
>
> I have a Timesheetline table recording jobstart, jobend times/dates etc.
Do
> I store jobtotalhours in the table and do I store Client charge and
> EmployeePaid amounts.  I would not normally store calculated values in a
> table but as these calculations are quite complex (different charge rates,
> time periods e.g std and overtime etc) I thought that once calculated (at
> the point of data entry) why not store these values in table (may improved
> report speed/programming). Alternativley, isn't this what computers are
for
> ie carrying out complex calculations so why store value, when it comes to
> reporting on or
> displaying etc simply recaculate.   My leaning now is not to store these
> values. Any thoughts?
>
> Richard
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
>
>
>
>

________________________________________________
Message sent using UebiMiau 2.7.2




More information about the AccessD mailing list