R
RobertG
Hi all,
I hope this will be a simple question/answer, so I'll explain in brief.
I have a need to track address(es) for people in a database, as well as the
address(es) of their employer. How would I do this with only one address
table?
Here is what I'm thinking (pertinant info only):
1 Person -> Many Employers
1 Person -> Many Addresses
1 Employer -> Many Addresses
tblPerson
PersonID (PK)
Other Info...
tblEmployer
EmployerID (PK)
PersonID (FK)
Other Info...
tblAddress
AddressID (PK)
PersonID (FK)
EmployerID (FK)
Other Info...
The address table is the one that I'm second-guessing myself on... it looks
a bit odd to me having both the PersonID and EmployerID as FK in there. Is
this the correct way of doing this or am I way off? If this is not the
correct way to do something like this, any suggestions/critique will be
greatly appreciated!
Thanks,
Robert
I hope this will be a simple question/answer, so I'll explain in brief.
I have a need to track address(es) for people in a database, as well as the
address(es) of their employer. How would I do this with only one address
table?
Here is what I'm thinking (pertinant info only):
1 Person -> Many Employers
1 Person -> Many Addresses
1 Employer -> Many Addresses
tblPerson
PersonID (PK)
Other Info...
tblEmployer
EmployerID (PK)
PersonID (FK)
Other Info...
tblAddress
AddressID (PK)
PersonID (FK)
EmployerID (FK)
Other Info...
The address table is the one that I'm second-guessing myself on... it looks
a bit odd to me having both the PersonID and EmployerID as FK in there. Is
this the correct way of doing this or am I way off? If this is not the
correct way to do something like this, any suggestions/critique will be
greatly appreciated!
Thanks,
Robert