captain stag
New member
- Local time
- Today, 14:16
- Joined
- Apr 13, 2005
- Messages
- 3
I'm trying to create a db to store for example Company Details, Staff Details, and Address Details.
Each company may have multiple addresses
Each staff may have multiple addresses
Each Address is EITHER a company/staff address
The address table structure is the same for both Company & Staff
I have come up with three solutions, each of which does not seem correct.
1) Create two Address tables each linked one to many from the Company/Staff
PRB: Duplicate address tables seem inefficient and queries/future modifications will need to be duplicated
2) "Tag" the address table either by adding an additional field specifying if Company/Staff, or programatically manipulate the key (+ve = company; -ve=staff)
PRB: Lose referential integrity: extar manipulation of queries, code etc.
3) Create a Junction Table with fields for the Address Key, Company Key, and Staff Key.
PRB: Not really a many-to-many (as Each Address relates to one of Company/Staff); Not normalised as either the Company or Staff Key will be empty
I'm sure I must be missing the obvious, but any suggestions would be greatly appreciated.
Each company may have multiple addresses
Each staff may have multiple addresses
Each Address is EITHER a company/staff address
The address table structure is the same for both Company & Staff
I have come up with three solutions, each of which does not seem correct.
1) Create two Address tables each linked one to many from the Company/Staff
PRB: Duplicate address tables seem inefficient and queries/future modifications will need to be duplicated
2) "Tag" the address table either by adding an additional field specifying if Company/Staff, or programatically manipulate the key (+ve = company; -ve=staff)
PRB: Lose referential integrity: extar manipulation of queries, code etc.
3) Create a Junction Table with fields for the Address Key, Company Key, and Staff Key.
PRB: Not really a many-to-many (as Each Address relates to one of Company/Staff); Not normalised as either the Company or Staff Key will be empty
I'm sure I must be missing the obvious, but any suggestions would be greatly appreciated.