Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Design of table relationship
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Design of table relationship
Miscellaneous
Thread ID:
00661654
Message ID:
00661654
Views:
58
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,
Randy Bosma
VFP - Because life is too short to code in something else...
Next
Reply
Map
View

Click here to load this message in the networking platform