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...