Below is the structure of the tables as it is now. Is it good design to have two table attributes/fields use the same relationship?
resOwner and resVendor both refer to orgID it just depends on the orgType. I thought of breaking the Organization table into an Owner and Vendor tables but then how would Address know which table it referred to? foreign keys to both table and only use one or the other?
Organization Table
orgID
orgName
orgType (Vendor | Owner | etc)
Address Table
addID
addStreet
addState
addZip
addType (Billing | HQ | etc)
orgID
Resouce Table
resID
resName
resType
resOwner -> orgID
resVendor -> orgID
-chris
_______________________________________
resOwner and resVendor both refer to orgID it just depends on the orgType. I thought of breaking the Organization table into an Owner and Vendor tables but then how would Address know which table it referred to? foreign keys to both table and only use one or the other?
Organization Table
orgID
orgName
orgType (Vendor | Owner | etc)
Address Table
addID
addStreet
addState
addZip
addType (Billing | HQ | etc)
orgID
Resouce Table
resID
resName
resType
resOwner -> orgID
resVendor -> orgID
-chris
_______________________________________