Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help please - normalization question
Message
From
05/07/2001 16:47:37
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
05/07/2001 16:33:25
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00527186
Message ID:
00527192
Views:
26
>I understand that:
>1) The 3rd normal form is the ideal way to designing a database.

I would say, the 5th. normal form, which has some interesting additional requirements. I don't have the details at hand now, but when I read about "normalization" (after programming for several years), I realized that I was already applying most of the rules.

>2) One of the requirements of 3rd normal form is that no fields contain redundant information. This in turn means no field should exist which can be calculated by summing values from a child table.
>
>I find two problems with this:
>1) Considerable time is spent summing the same data again and again.

In actual practice, I avoid having data that can be calculated from other data in the same record. For summaries from other records, I agree with your comments about considerable time being wasted.

>2) There is no easy and efficient way (with SQL) of obtaining a single record for each transaction that shows the total of each summary category. This of course is needed to create effective reports.

HELP SELECT - SQL. Look for GROUP BY.

Sample:
select client, sum(totalinvoice) as totalinvoice from invoice;
  group by client
In this example, the invoice header file is used, which contains data already totalled (from the invoice details).

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform