I am developing a student results website in which :-
I designed three tables :-
The problem now is How can i store a result ?? how can i design the results table to contain degrees for different subjects ???
Thanks
Results will be a table that has the following values (results) and the following foreign keys Student, Subject, (possibly year)
Have a degrees table and an association table between subject and degree
Results -> Student
-> Subject
-> Year?
Degree <- DegreeSubject -> Subject
I think you want a Results table like this.
Results
--------
Student_ID (FK to Students)
Years_Subjects_ID (FK to Years_Subjects)
Score
I don't think it would be best to have a FK to Years and another FK to Subjects, because you won't be able to easily prevent a row that represents a subject that was not offered in a particular year.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.