>Bill,
>
>Two ideas come to mind, 1 your data is not in thrid normal form if you are storing the result of a calculation. That means it is not unusual to require the extra TableUpdate. 2 By violating third normal form you have created a sequence dependency on the tableupdates, the child must always be done first and the parent must always be done if the child was done.
>
>When we choose to break a normalization rule we often pay with more complex code to handle integrity issues. The real question here is, "Is it better to store the total and have complex integrity code, or not store the total and have simple integrity code."
Generally you're right, and I often wish I could follow the rule, but -
many times I have such a situation that I can't simply recalculate the sums, because some additional things are done once per parent record. For instance, in a classical invoice example, I can't just total qty*price, because there's some transport cost added (without quantity), among other things, and it appears only once per invoice. Another matter is manual rounding of the total (some customers insist on that). Our solution was always to pull any calculation (and prompt for additional ammounts) in an additional form which pops up whenever user decides that a document is finished, i.e. no more line items to add. This also means that the form is one and only way to approach the child and parent data - no grids etc.