Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Revisiting Normal Forms
Message
 
To
20/11/1998 17:23:13
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00159608
Message ID:
00160031
Views:
27
>One of my reasons is to keep calculated values in parent tables, though they may be recalculated from the child tables. Two reasons: first - there's always something which is added from the parent table (like one overall shipping cost, which can't be assigned to any specific line item)

That in itself wouldn't be reason enough, since it doesn't prevent recalculation. You'd just add a shipping cost to the parent table. Yes, it's at least partially dependent on line items, but not completely.

>, second - the rules for calculating may change in time, and one is never too sure if pulling last year's data would yield the same result if today's rules apply.

In that case, your schema is not denormalized at all, since the total amount is not wholly dependent on the line items. In a completely normalized schema, you'd have a Rules for Calculating table (which would be possible in VFP, if not in other environments), but whether that would be worth it depends on the needs of the business. As you say, most of the time you don't need to recalculate at all (which, of course, begs the question that perhaps amounts aren't necessary in the line items table once the total has been calculated).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform