Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Design of table relationship
Message
From
27/05/2002 09:54:38
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00661654
Message ID:
00661669
Views:
25
>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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform