Y
Yair Sageev
Hi,
Sorry for the cross-post. I think I might have what could be a difficult
question:
We have numerous form and report fields whose values are calculated from
other values stored in tables.
I would like to move these calculations to the tables themselves -- is this
possible?
The reason I am asking is that it seems impossible to run a query on values
that aren't in the database proper, even though those values are just as
important as the stored values. We need to calculate those values, since
the user shouldn't have to manually calculate them. But if they can be
moved to a column in a table, how does the database, be it Access or MSDE,
handle the updating of calculated values if the original values are changed.
To be more clear, suppose I have a table column called "Budget" in the
"Project" table. This number is entered by the user. I would like to have
another column in the table called CostPerWorker, which isn't manually
edited, and whose value is "(Budget - Materials) / NumberOfWorkers".
Supposing I could set this up -- what happens if, one day, somebody goes and
changes the "Budget" value? Do the dependent fields get updated?
What happens if there are 20 divisions to the project called "ProjectPhase",
each a record foreign-keyed to Projects, and we would like to know the
CostPerWorker of each ProjectPhase, and somebody changes the value of
"Budget". Is the database smart enough to update CostPerWorker for each
ProjectPhase *immediately*? If I change "Budget" and run a query asking
"what are the top 10 ProjectPhases that have the highest CostPerWorkers for
a given project?", will the result set be accurate?
How do people deal with this type of situation?
Much thanks.
Sorry for the cross-post. I think I might have what could be a difficult
question:
We have numerous form and report fields whose values are calculated from
other values stored in tables.
I would like to move these calculations to the tables themselves -- is this
possible?
The reason I am asking is that it seems impossible to run a query on values
that aren't in the database proper, even though those values are just as
important as the stored values. We need to calculate those values, since
the user shouldn't have to manually calculate them. But if they can be
moved to a column in a table, how does the database, be it Access or MSDE,
handle the updating of calculated values if the original values are changed.
To be more clear, suppose I have a table column called "Budget" in the
"Project" table. This number is entered by the user. I would like to have
another column in the table called CostPerWorker, which isn't manually
edited, and whose value is "(Budget - Materials) / NumberOfWorkers".
Supposing I could set this up -- what happens if, one day, somebody goes and
changes the "Budget" value? Do the dependent fields get updated?
What happens if there are 20 divisions to the project called "ProjectPhase",
each a record foreign-keyed to Projects, and we would like to know the
CostPerWorker of each ProjectPhase, and somebody changes the value of
"Budget". Is the database smart enough to update CostPerWorker for each
ProjectPhase *immediately*? If I change "Budget" and run a query asking
"what are the top 10 ProjectPhases that have the highest CostPerWorkers for
a given project?", will the result set be accurate?
How do people deal with this type of situation?
Much thanks.