classes sits between subjects and students
Attaching grades to a subject would be shorter and would merge every section of Mathematics into one. The class is what a timetable, a teacher assignment and a room all belong to, and two sections of the same subject are genuinely different courses to the students in them. The cost is an extra join on every academic query and the need to decide what happens to a class at the end of a semester.