Creating Junction Table with the same primary Keys ?

G

Guest

I am new to access and I am working on a project for work.
My problem is that I have two table. The first table is labeled
LeadProjectManager and the second table is labeled ProjectManager. Both
tables have EmployeeID, First Name and Last Name as attributes.
They have a many to many relationship so I created a junction table. My
question is can the junction table contain only one attribute which is
EmployeeID that happens to be a primary key for both tables ?
Please Help.
 
J

Jeff Boyce

Mark

If your two tables have a many-to-many relationship (and based on the table
names), then you are saying that one LeadProjectManager can have multiple
ProjectManagers, and one ProjectManager can have multiple
LeadProjectManagers. This doesn't seem feasible, but maybe I'm not
understanding your situation.

Also, if an Employee could be a Lead Project Manager, or a Project Manager,
or a ..., these seem to be roles, and would NOT need separate tables. You
might be able to get by with a single Employee table and then "assign" the
employee one role or another in relation to a specific project.

But then, you're the one who knows your data/situation best...

Regards

Jeff Boyce
<Office/Access MVP>
 
G

Guest

Thank You Jeff. You are right. I do not need both tables. I only need 1
table. Gosh do I feel stupid now.
 
J

Jeff Boyce

Mark

Actually, you'll end up with more tables, since you'll probably want to use
a table of valid roles. Designing a well-normalized relational database
structure isn't about how many tables, it's about how your entities (and
attributes) are related.

Since Access is a relational database, many of the functions and features
are optimized to handle data organized that way. For example, a spreadsheet
pretty much forces you to use "repeating columns" to record data like the
OrderItems in an Order. This organization scheme in Access is
counterproductive.

Best of luck on your project.


--
Regards

Jeff Boyce
Microsoft Office/Access MVP
Microsoft IT Academy Program Mentor
 

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