Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Design of table relationship
Message
De
27/05/2002 09:54:38
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00661654
Message ID:
00661669
Vues:
23
>What is the proper way to set up the relationship between a ‘parent’ table (one record per service location) and the ‘child’ table (one, two, or three addresses per service location)?
>
>Here’s two ways I’ve come up with:
>
>Service table 1:
>CustCode C(6)
>CustName C(30)
>ServAddr Integer
>BillAddr Integer
>OthrAddr Integer
>LastServ Date
>Etc…
>
>Address table 1:
>AddrCode Integer
>AttnLine C(30)
>AddLine1 C(30)
>AddLine2 C(30)
>Etc…
>
>And plan ‘B’
>
>Service table 2:
>CustCode C(6)
>CustName C(30)
>LastServ Date
>Etc…
>
>Address table 2:
>CustCode C(6)
>ServAddr Logical
>BillAddr Logical
>OthrAddr Logical
>AttnLine C(30)
>AddLine1 C(30)
>AddLine2 C(30)
>Etc…
>
>As I perceive it, both are normalized. Is one design better than the other?
>
>TIA,

I don't quite understand what is the basic difference between the two approaches, or what is the underlying philosophy of each approach.

For now, let me remind you that you can put the address in a single memo field. Two or more "adress lines" in separate fields seem, to me, more difficult to manage.

HTH, 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