Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Help with Many to Many Relationships

Help with Many to Many Relationships

Help with Many to Many Relationships

I am a novice and am trying to develop a database for managing course and instructor information.

I have courses, instructors, TAs, and readers.

Each course can have more than one instructor, TA, or reader (for example,
1 instructor, 2 TAs, 1 reader or 2 instructors, 1 TA, and 2 readers or one instructor without TAs or readers).

All courses have instructors, but some of them don't have a TA or a reader
or have only one of them.

Each instructor can teach more than one course. So I think this creates a
many to many relationship.

It gets complicated (for me, at least) because an instructor of a course can also serve
as the reader for that course and/or as the TA as well, so I don't even
know what to call that kind of relationship.

Additionally, an instructor in one course can serve as a TA in a different course that has a different instructor.

I tried to model this but got stuck creating the relationships.
I first created four tables: Courses, Instructors, TAs, and Readers.
Then I created a junction/link table to accommodate the many to many situation, but I couldn't figure out how to handle the relationships between each of my staff tables and the Courses tables.

How do I make the PK from the staff table the FK in multiple places in the junction table (Instructor1, Instructor2, TA1, TA2, Reader1, Reader2)?

Do I even need the junction/link table? Do I need more junction tables?


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close