Structuring a Corporate Catagories Design

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have multiple contractor categories in a Categories Table and I would like
to link this to a Contractors Table (e.g. Names of individual contracting
companies, address info., etc.), however, I am unsure how to set a primary
key field if there is more than one contact person for each company. How
should I link the Categories table with the Contractors table. What should I
use for the primary key in the latter table?
 
Contractors and Contacts belong in separate tables. The categories would
relate to Contractors rather than Contacts and you would use a fourth table
to make this many-to-many relation:
tblContractor:
ContractorID (pk)
ContractorName
Address
etc.
tblContact:
ContactID (pk)
ContractorID (fk to tblContractor)
FirstName
etc.
tblCategories:
CategoryID (pk)
CategoryName
etc.
tblContractorCategory:
CategoryID (pk fld1, fk to tblCategory)
ContractorID (pk fld2, fk to tblContractor)
 
Back
Top