I want to display a table like this

Generated from three database tables depends on student ID

Is this the best way to insert the students’ marks? If I have 5,000 student and 10 subjects and 12 exam in year, I will have more than 500.000 record in table Stu_Marks
Yes, the tables are normalized. BTW you should also have a student table for student information (name, surname).
Regarding the number of records: what you’re referring to is the granularity of the data and yours is related to the tuple {student, subject, exam}. If you want to store information for every single student vote, there’s no way to avoid a table of 500,000 records.