Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help please - normalization question
Message
De
05/07/2001 16:47:37
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
05/07/2001 16:33:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00527186
Message ID:
00527192
Vues:
27
>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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform