Path: news.cambrium.nl!textnews.cambrium.nl!feeder2.cambriumusenet.nl!feed.tweaknews.nl!209.197.12.242.MISMATCH!nx01.iad01.newshosting.com!newshosting.com!news.glorb.com!newsfeed2.telusplanet.net!newsfeed.telus.net!edtnps83.POSTED!7564ea0f!not-for-mail
From: paul c <toledobythesea@oohay.ac>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
Newsgroups: comp.databases.theory
Subject: Re: teaching relational basics to people, questions
References: <3e504a39-b3a1-427d-93da-0963f2a31815@m38g2000yqd.googlegroups.com> <he6tjg$tlg$1@mud.stack.nl> <d21822d7-b882-4a9c-830d-466121898cb7@d21g2000yqn.googlegroups.com> <3eudnYx_I7CpiZXWnZ2dnUVZ7qSdnZ2d@pipex.net> <H8KdnceVl4MtaJXWnZ2dnUVZ_sidnZ2d@giganews.com> <N8Sdnf8ODpfs8ZfWnZ2dnUVZ8g-dnZ2d@pipex.net> <BOydncOJWsq-y5PWnZ2dnUVZ_i2dnZ2d@giganews.com> <9a0f4cc3-ef8c-47b5-afb1-825651df9980@13g2000prl.googlegroups.com> <v8udnRsywfTArI_WnZ2dnUVZ_rqdnZ2d@giganews.com>
In-Reply-To: <v8udnRsywfTArI_WnZ2dnUVZ_rqdnZ2d@giganews.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 58
Message-ID: <DASUm.55772$Db2.7870@edtnps83>
Date: Sat, 12 Dec 2009 19:57:23 GMT
NNTP-Posting-Host: 75.155.239.97
X-Trace: edtnps83 1260647843 75.155.239.97 (Sat, 12 Dec 2009 12:57:23 MST)
NNTP-Posting-Date: Sat, 12 Dec 2009 12:57:23 MST
Xref:  news.cambrium.nl

Mr. Scott wrote:
...
> 
> In a typical table,
> 
> CTRS {COURSE, TEACHER, ROOM, STUDENT},
> 
> each row states that a particular COURSE is taught by a particular TEACHER
> in a particular ROOM to a particular STUDENT.
> 
> Now, while it can be argued that there can't be a course without a teacher,
> or that there can't be a course without a student, or that there can't be a
> student without a teacher, the room exists independent of whether there is a
> course, or a teacher or a student.  It therefore follows that locating the
> fact that 'there is a room <ROOM>' only in table CTRS is a problem because
> then there could only be a room whenever there is at least one course and at
> least one teacher and at least one student.  When one inserts a row into an
> empty CTRS, one effectively asserts
> 
>     ...
>     that 'there is a room <ROOM>,' ...

This presumes that the predicate for a table R { ROOM } is the same as 
the predicate of CTRS { ROOM } but from the dbms perspective it's patent 
they can't be, since R and CTRS don't even have the same heading.  If 
CTRS is not base, maybe you can say such but if it is base, one can only 
assert that there exists some teacher, student and course such that room 
<ROOM> is involved.

> 
> If you disagree that all of these assertions are a consequence of inserting 
> a single row, then how is it that there can be an answer to the query, "is 
> course <COURSE> held in room <ROOM>?"  Unless there is the possibility that 
> 'course <COURSE> is held in room <ROOM>,' there can be no answer (at least 
> not a yes or a no) to the query.
> ...

If CTRS is base, that question is strictly not answerable.  I suspect 
that the man in the street might think such a query is possible (not to 
mention many db designers) but to be precise I think it's important to 
distinguish what is from what could be, otherwise we lapse into 
mysticism.  A query that is answerable from CTRS is "are there some 
teachers and students such that course <COURSE> and room <ROOM> are 
involved?".

Just because SQL and the like might not be expressive enough to prevent 
the query doesn't mean the most basic condition, ie., the definition of 
CTRS, can be ignored.  A language that might reflect this might have two 
sets of operands for projection instead of one.

(I also realize that the usual explanations of projection operators 
don't make this clear.  Not that table/relvar names carry any 
significance other than as a device to segregate rows/tuples according 
to predicate but it might be more suggestive of the actual situation if 
the name of CTRS were changed to 'EXPELLED'.)



