Re: Hopelessly circular relationships

From: Gene Wirchenko <genew_at_mail.ocis.net>
Date: Sun, 18 Jul 2004 10:33:00 -0700
Message-ID: <geclf0hc2udne0vs2cnrqbf6l9f7leu1rs_at_4ax.com>


"Richard Hollenbeck" <richard.hollenbeck_at_verizon.net> wrote:

>> 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

     Not unclear, but inaccurate.

>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"

     Can a subactivity be common to two courses? If so, then you do not have uniqueness here.

>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.

     Nope. You are looking only at the relationship connections (the lines) and not at the direction of the 1:M. There is no circle.

     Throw away what you have, and go back to the drawing board. This time, express the relationships not just by connection but by how (1:M, M:N, etc.).

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:

     I have preferences.
     You have biases.
     He/She has prejudices.
Received on Sun Jul 18 2004 - 19:33:00 CEST

Original text of this message