I'm trying to define a table to store student grades for a online report card. I can't decide how to do it, though.
The grades are given by subject, in a trimestral period. Every trimester has a average grade, the total missed classes and a "recovering grade" (i don't know the right term in english, but it's an extra test you take to try to raise your grade if you're below the average), I also gotta store the year average and final "recovering grade". Basically, it's like this:
Subject 1st Trimester 2nd Trimester 3rd Trimester Year Avg. Final Rec. Avg. Mis. Rec Avg. Mis. Rec Avg. Mis. Rec Math 5.33 1 4 8.0 0 7.0 2 6.5 7.0 Science 5.33 1 4 8.0 0 7.0 2 6.5 7.0
I could store this information in a single DB row, with each register beeing like
1tAverage | 1tMissedClasses | 1tRecoveringGrade | 2tAverage | 2tMissedClasses | 2tRecoveringGrade
And so on, but I figured this would be a pain to mantain, if the scholl ever decides to grade by bimester or some other period (like it used to be up until 3 years ago).
I could also generalize the table fields, and use a tinyint for flagging for which trimester those grades are, or if they're the year finals.
But this one would ask for a lot of subqueries to write the report card, also a pain to mantain.
Which of the two is better, or is there some other way? Thanks