Re: Hopelessly circular relationships

From: Richard Hollenbeck <richard.hollenbeck_at_verizon.net>
Date: Sun, 18 Jul 2004 06:57:45 GMT
Message-ID: <JbpKc.7841$lz2.7233_at_nwrddc03.gnilink.net>


> Courses have Activities which have Subactivities which have Scores.
> Courses have Students which have Scores.

Seems right but actually, neither students nor subactivities have scores. It is the combination of students and subactivities which actually gets a score. That was my fault for being unclear in the original post. An activity cannot directly get a score because it's a score for many different students. The student cannot directly receive a score, because he or she will be receiving many scores (one for each subactivity.) To try to solve this problem I created a new table called "StudentScores" for want of a better name. This table only has three fields: a combined key of "studentID and "subactivityID" and a field called "score"

So students are indirectly associated with the courses by their scores.

Many students will take one course and one student will take many courses. In an attempt to remove the obvious many-to-many problem I created a table called "StudentsInCourses" with only two fields: a combined key of "studentID" and "courseID."

Now the students are also indirectly associated with the courses by "StudentsInCourses" table. This forms a complete circle. Received on Sun Jul 18 2004 - 08:57:45 CEST

Original text of this message