# Re: teaching relational basics to people, questions

Date: Sat, 28 Nov 2009 17:43:07 -0500

Message-ID: <6e-dnX77LuXhOozWnZ2dnUVZ_jSdnZ2d_at_giganews.com>

"paul c" <toledobythesea_at_oohay.ac> wrote in message
news:oCbQm.55478$PH1.3123_at_edtnps82...

*> Mr. Scott wrote:*

*> ...*

*>> An example might help. In the 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. ...*

*>*

*> That's a good example of mysticism. Unless an application requirement is *

*> given that rooms are independent in this way,*

What do you mean by mysticism? A room is a room even if it isn't being used to hold classes. It's existence is therefore independent of the existence of any courses, teachers, or students. That's just plain ordinary common sense--the opposite of mysticism.

*> one might just as easily conclude that CTRS is the only base relation in *

*> the db.*

That is my point exactly: if CTRS is the only table in the db, then there are delete anomalies due to the existence of a room being dependent upon the existence of at least one each of courses, teachers and students, and further that those delete anomalies are a direct consequence of the logical connective that interconnects the atomic formulas that are represented by each row. The point of my example was to emphasize that whenever a row represents a non-atomic proposition, the logical connective between the atomic formulas that the proposition is composed of is not AND but IFF. Since each row exemplifies the table's predicate, that predicate must also be composed of a collection of interconnected atomic formulas, and the logical connective must be IFF rather than AND. It therefore doesn't make sense to define a relvar's predicate as the logical /conjunction/ of all of the constraints that mention it.

*> In that case, the set of rooms must be a projection of CTRS. Without *

*> further information, I'd have no choice but to conclude that second *

*> choice. In my experience, the implementation of unstated requirements has *

*> been a huge unnecessary cost in many db's.*

Received on Sat Nov 28 2009 - 16:43:07 CST