How to model (a many to many) to many relationship
The tables student and major are good.

However following improvements can/should be made.


Merge the FKs in MajorStudent to a PK, getting rid of the id
Save a StudentFK and MajorFK rather than a MajorStudentFK in Exam, well one can discuss about this though but it'll be faster and in my consideration NOT redundant
Grade is not normalized. All attributes are supposed to be atomic and grade is not. Either make 4 columns (bad) or use the following

Exam(id[PK], studentId[FK], MajorId[FK])
Grades(id[PK], examId[FK], value)


I don't understand why one exam comes with four grades though.