LuciusThorne
MIS
Presented below is the current table structure. Is it considered a good design practice to have two table attributes/fields utilizing the same relationship?
Both resOwner and resVendor attributes correspond to orgID, with the distinction being the orgType. I have contemplated dividing the Organization table into separate Owner and Vendor tables. However, this raises the question of how the Address table would determine which table it references. Should foreign keys be utilized for both tables and only one of them be employed?
Organization Table:
orgID
orgName
orgType (Vendor | Owner | etc)
Address Table:
addID
addStreet
addState
addZip
addType (Billing | HQ | etc)
orgID
Resource Table:
resID
resName
resType
resOwner -> orgID
resVendor -> orgID
Both resOwner and resVendor attributes correspond to orgID, with the distinction being the orgType. I have contemplated dividing the Organization table into separate Owner and Vendor tables. However, this raises the question of how the Address table would determine which table it references. Should foreign keys be utilized for both tables and only one of them be employed?
Organization Table:
orgID
orgName
orgType (Vendor | Owner | etc)
Address Table:
addID
addStreet
addState
addZip
addType (Billing | HQ | etc)
orgID
Resource Table:
resID
resName
resType
resOwner -> orgID
resVendor -> orgID