I have confused with one situation need to model with ERD model :
Students study on course and each semestr get grade on it so i built three tables : student , course and student's course ther i will ave his grade.
But i have to accumulate some historical data : the average grade and accumulated by student credit point's . So how i can do it . Its derived data but it isnt derived from fields of the same row , its derived from rows of definite student (it may be 1 to 8 semestrs)
And i need to save overall average and credit points each semestr.
The more general problem how i save the historical and derived data in
database an how to model it in ERD.
How i can to solve it . Combine the student with one more table there i save all these data but calculating it from table of student's course ?
i would use views to produce totals grouped by semester and student
you said you had to save them, and of course you would save them in the appropriate record
but saving them means an update dependency -- if you add a new row to studentsemestercourse with credit points, then you have to re-calculate the average in studentsemester, and also student, whereas the averages in the view are correct at all times, since the view calculates them from the studentsemestercourse rows