View Single Post
Join Date: Dec 2007
Posts: 2
Reputation: sabatier is an unknown quantity at this point 
Solved Threads: 0
sabatier sabatier is offline Offline
Newbie Poster

Re: Student Database Design

 
0
  #4
Mar 6th, 2008
Originally Posted by LeBurt View Post
Further on the StudentSubjects table...

You have a one-to-many relationship between StudentSubject and ExamResults. Is that a true representation of life, in other words can one student, for one subject, have more than one exam result (mid-term, finals, etc.)?

If yes (which I suspect), the ExamResults table needs one more bit of info about which exam this is. You could 1) add an ExamNo field in it; 2) add a table Exam with an ExamCode PK, and then an ExamCode FK field in ExamResults; 3) add an ExamDate field in ExamResults. Personally I would go for option 2 and list all possible exams in that school with fields like: ExamCode (PK), SubjectCode (FK), ExamDate, Building, Classroom, etc.

In any case, I agree with Aaron's suggestions above: remove StudentSubject table and replace with the modified ExamResults, make sure every table has a PK, and reinforce your constraints.

Thank you both very much for your replies. I did as you suggested; I got rid of the StudentSubjects table, and put on an ExamNo primary key on the ExamResults table. LeBurt, I went with your option 1 because its a very simple application and the only information I have about an exam is whether it was done in June or in September (no specific dates). I think (hope) I'll get away with that for this project :-)

Cheers,

sabatier
Reply With Quote