T
Tom
I need to add a table to the "many-to-may" structure (see
below).
Basically, the structure I currently have allows to have
multiple employees assigned to a job.
I now need to add two additional table (e.g. "location"
& "comments"). Obviously, there can be multiple
locations and comments in the structure.
I first tried to follow the existing structure
and "copied" the tblEmployees and then renameed it to
tblLocation.
I modified and added the 3rd primary key (LocID) in the "
tblJobAssignments". However, when querying for
information I now don't get any results in the query.
Quick structure recap:
- Multiple jobs/projects
- Multiple employees (some of them assigned to same job)
- Multipe locations (some locations are assigned to same
job/project)
- Multiple comments for each job
Here are now my questions:
1. How should I join the additional tables (location,
comments, etc.) into the existing structure.
2. What are their relationships (PKs, one-to-many, many-
to-many)?
This design has really become a challenge for me. I
appreciate all help I can get on this!
********** EXISTING STRUCTURE ********************
tblJobs
JobID JobTitle
(JobID is Autonumber Primary Key)
tblEmployees
EmpID EmpName
(EmpID is Autonumber Primary Key)
tblJobAssignments
JobID EmpID
(both fields Long Integer)
(Primary Key: JobID, EmpID)
(Relationship: JobID foreign key to tblJobs.JobID, one
to many)
(Relationship: EmpID foreign key to tblEmployees.EmpID,
one to many)
tblJobs Contents (JobID contents determined by Access):
JobID JobTitle
==================
51 Analyst
52 Engineer
53 Manager
54 Analyst II
tblEmployees Contents (EmpID contents determined by
Access):
EmpID EmpName
================
121 Jack
122 Ben
123 Sue
124 Carol
125 Mike
126 Tom
tblJobAssignments Contents:
JobID EmpID
===============
51 121
52 122
52 123
53 124
53 125
54 126
*******************************************
below).
Basically, the structure I currently have allows to have
multiple employees assigned to a job.
I now need to add two additional table (e.g. "location"
& "comments"). Obviously, there can be multiple
locations and comments in the structure.
I first tried to follow the existing structure
and "copied" the tblEmployees and then renameed it to
tblLocation.
I modified and added the 3rd primary key (LocID) in the "
tblJobAssignments". However, when querying for
information I now don't get any results in the query.
Quick structure recap:
- Multiple jobs/projects
- Multiple employees (some of them assigned to same job)
- Multipe locations (some locations are assigned to same
job/project)
- Multiple comments for each job
Here are now my questions:
1. How should I join the additional tables (location,
comments, etc.) into the existing structure.
2. What are their relationships (PKs, one-to-many, many-
to-many)?
This design has really become a challenge for me. I
appreciate all help I can get on this!
********** EXISTING STRUCTURE ********************
tblJobs
JobID JobTitle
(JobID is Autonumber Primary Key)
tblEmployees
EmpID EmpName
(EmpID is Autonumber Primary Key)
tblJobAssignments
JobID EmpID
(both fields Long Integer)
(Primary Key: JobID, EmpID)
(Relationship: JobID foreign key to tblJobs.JobID, one
to many)
(Relationship: EmpID foreign key to tblEmployees.EmpID,
one to many)
tblJobs Contents (JobID contents determined by Access):
JobID JobTitle
==================
51 Analyst
52 Engineer
53 Manager
54 Analyst II
tblEmployees Contents (EmpID contents determined by
Access):
EmpID EmpName
================
121 Jack
122 Ben
123 Sue
124 Carol
125 Mike
126 Tom
tblJobAssignments Contents:
JobID EmpID
===============
51 121
52 122
52 123
53 124
53 125
54 126
*******************************************