AnsweredAssumed Answered

Options for complex composite keys in join tables

Question asked by LuisHernandez on Jul 2, 2015
Latest reply on Jul 2, 2015 by LuisHernandez


Options for complex composite keys in join tables



Context: Small school enrollment database

Purpose: track student enrollment, grades, classes, etc.

I am trying to link student enrollment with their courses. Currently a student will be enrolled in a semester and level, then enrolled in classes. I have used composite keys to accomplish this. The Student_Level enrollment keys have StudentID & SemesterID & Level. The Student_Course has the above id and an additional course id.

The problem is that this results in an 8 digit number (StudentID) + 4 digit SemesterID + Level + CourseID. No one could be expected to enter that key in a layout. The only solution I can think of is to add fields to each of my tables with redundant info (semester, level, student, course) and let the computer auto enter both the foreign and primary keys.

Would anyone be able to offer a solution to this issue?

Thank you.