gene.seeker Posted February 5, 2009 Posted February 5, 2009 I have a table with STUDENTS and I want to set up relationships between some of them. We have a mentoring program and in any particular academic year some students (upperclassmen) will be "Mentors" for new majors "Mentees". There will be new Mentor-Mentee pairs in successive academic years. I want to keep track of this. So, I want a unique identifier for a Mentor-Mentee relationship and I want to keep track of who's the mentor and who's the mentee in each relationship. So it seems like I need a "Mentor-Mentee" Table that has a unique record key, but I'm not sure what kind of foreign key to use to link students in. Should I have a mentor_fk and a mentee_fk, and should each of these link to the unique key for each student. Can I link twice to a student from this table? Or is there a better way to set this up?
RalphL Posted February 6, 2009 Posted February 6, 2009 I think you are on the right track. You do not need a primary key field but 2 foreign keys which combine to make the primary key as in a many to many relationship. Both foreign keys would relate to the primary key of the student table. I would record the year in this table.
Recommended Posts
This topic is 5829 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now