B
Brandon Cheal
I have a project table that keeps info about projects.
There is one record for each project, but there can be a
project lead and a project assistant.
I have a table of employees, but an employee could be a
lead or an assistant on any project. So I can't do a one
to many relationship from the EmployeeID to both fields on
the project table obviously.
But I want to keep this as simple as possible for
reporting purposes because I'll want to sort by both
fields.
My proposed solution:
Have two more tables, tblLead and tblAssistant.
tblLead has two fields, LeadID and EmployeeID
tblAssistant has two fields, AsstID and EmployeeID
I can have a one to many from tblEmployee.EmployeeID to
both tables, and then have a one-to-many from
tblLead.LeadID to tblProject.Lead. Also a one-to-many
from tblAssistant.AsstID to tblProject.Assistant.
I have a pretty good handle on understanding relationships
for the most part, but for some reason this situation is
throwing me for a loop. Is this the BEST solution, or am
I opening myself up for problems? Thanks
brandon
There is one record for each project, but there can be a
project lead and a project assistant.
I have a table of employees, but an employee could be a
lead or an assistant on any project. So I can't do a one
to many relationship from the EmployeeID to both fields on
the project table obviously.
But I want to keep this as simple as possible for
reporting purposes because I'll want to sort by both
fields.
My proposed solution:
Have two more tables, tblLead and tblAssistant.
tblLead has two fields, LeadID and EmployeeID
tblAssistant has two fields, AsstID and EmployeeID
I can have a one to many from tblEmployee.EmployeeID to
both tables, and then have a one-to-many from
tblLead.LeadID to tblProject.Lead. Also a one-to-many
from tblAssistant.AsstID to tblProject.Assistant.
I have a pretty good handle on understanding relationships
for the most part, but for some reason this situation is
throwing me for a loop. Is this the BEST solution, or am
I opening myself up for problems? Thanks
brandon