Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: extracting information from schemas
Tell your professor that since there are tutors that don't appear in any of the tables you can't determine the total number of tutors. Tell him to word his question less ambiguously and to resubmit it to the class. Remind him you're paying a lot of money for the course and you expect things to be done at a more professional level in the future. Receive an F.
I've been bombarded with developers asking for help with their SQL all day, so I'm not going to do this for you but probably a combination of functions Count, Unique and a set operation (Union?) between the first two tables.
Van
"chris" <damoncwk_at_hotmail.com> wrote in message
news:90bgct$1c0m11_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 Sat Dec 02 2000 - 17:23:45 CST