Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: extracting information from schemas
If a tutor does not have a preference, and is not preferred by any instructor, then your rules say theat tutor does not exist in any table. In Oracle, a FK Relation child can have a null reference to parent, so the tutor could exist in PreferredInstructor with name=null
"chris" <damoncwk_at_hotmail.com> wrote in message
news:90bgce$18gg3_at_hkunae.hku.hk...
> Dear all,
> If there are 3 relations as shown below:
> PreferredTutor(name varchar(40), instructor varchar(40))
> PreferredInstructor(name varchar(40), tutor varchar(40))
> Assignment(courseTitle varchar(40), instructor varchar(40))
>
> A tuple(x,y) is in PreferredTutor if an instructor x prefers a tutor y to
> work on his course.
> A tuple(x,y) is in PreferredInstructor if a tutor x prefers to work for
the
> instructor y.
>
> In reality, tutors may not have any preferred instructor to work with.
> tutors who do not indicate his preferred instructor and is not preferred
by
> any instructor will not have his or her name listed in any of the above 3
> tables. Suppose new tables are not allowed to be built, how can I ensure
> that all tutor names appear somewhere in the tables?
>
> And how can I find the total number of tutors using only the above 3
tables?
> Thx a lot!
>
>
>
>
>
Received on Sun Dec 03 2000 - 03:08:22 CST
![]() |
![]() |