Bystronic wrote:
Fisrt I think you should check your databse design,
if you are looking for a Many-to-Many relation the join table should contain
only two keys STUDENT_ID and EXAM_ID.
Actually, I think you don't have a many to many situation at all. You should have a separate entity called student exams because each student has a grade for each exam they take (I think your totalmarks column is computed and should be part of the student table).
So you have a many-to-one from StudentExam to Student and a Many-to-one from StudentExam to Exam.