Three tables: Courses, Instructors, and Roles.
Each course can have anywhere from 1 to 5 instructors, so a junction table works for that. However, we also need to say which instructor was the Lead Instructor, and each subsequent number is assigned for each additional instructor used up to a max of 5.
Sample Data:
CourseID InstructorID RoleID
1 1 1
1 2 2
First row translates to: Course 1, Instructor 1 "Jim Smith", was the Lead Instructor.
Second row: Course 1 had a second instructor "Tim Jones" the secondary instructor.
So, I need an index that allows a different course ID but insists that for each course the instructor and roles must be unique. Secondly, I want to enforce that the Roles are progressive... in other words, you have to choose role 1, then role 2, and that you cannot choose role 3 first and maybe no other roles...
I have tried different index combinations and Primary keys but I cannot seem to get it right... please help me :banghead:
Each course can have anywhere from 1 to 5 instructors, so a junction table works for that. However, we also need to say which instructor was the Lead Instructor, and each subsequent number is assigned for each additional instructor used up to a max of 5.
Sample Data:
CourseID InstructorID RoleID
1 1 1
1 2 2
First row translates to: Course 1, Instructor 1 "Jim Smith", was the Lead Instructor.
Second row: Course 1 had a second instructor "Tim Jones" the secondary instructor.
So, I need an index that allows a different course ID but insists that for each course the instructor and roles must be unique. Secondly, I want to enforce that the Roles are progressive... in other words, you have to choose role 1, then role 2, and that you cannot choose role 3 first and maybe no other roles...
I have tried different index combinations and Primary keys but I cannot seem to get it right... please help me :banghead: