Structuring a Corporate Catagories Design

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?
 
P

Pat Hartman\(MVP\)

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top