# Re: teaching relational basics to people, questions

Date: Sat, 28 Nov 2009 05:12:59 -0500

Message-ID: <RMKdnRt4oO8xao3WnZ2dnUVZ_vydnZ2d_at_giganews.com>

"paul c" <toledobythesea_at_oohay.ac> wrote in message news:Ad2Qm.55460$PH1.49121_at_edtnps82...

> compdb_at_hotmail.com wrote:

>> On Nov 26, 2:19 am, "Mr. Scott" <do_not_re..._at_noone.com> wrote:

> ... > ...

>>> The logical connective should be IFF rather than AND. The

>>> difference is subtle, and may at first glance appear problematic since>>> IFF>>> is true whenever none of its operands are true, but under the closed>>> world>>> assumption, the only atomic formulas that are ever represented in the>>> database are those that are supposed to be true, so there is no harm in>>> choosing IFF over AND. The main reason I think the connective should be>>> IFF>>> rather than AND involves deletes. While inserting a row effectively

*>>> asserts*

*>>> that all of the atomic formulas represented by the row are true*

*>> ...*

*>>*

*>> , regardless*

*>>> of the whether the logical connective is IFF or AND,*

*>> ...*

> > I believe IFF as well as AND can be expressed with NAND. So, what is the > argument?

The issue is that denying a conjunction merely asserts that at least one of the conjuncts is false, but not which. When the logical connective is IFF, denial of any of the operands denies all of the operands, otherwise the result would be inconsistent.

An example might help. In the typical table,

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 course <COURSE>,' that 'there is a teacher <TEACHER>,' that 'course <COURSE> is taught by teacher <TEACHER>,' that 'there is a room <ROOM>,' that 'course <COURSE> is held in room <ROOM>,' that 'teacher <TEACHER> teaches in room <ROOM>,' that 'course <COURSE> is taught by teacher <TEACHER> in room <ROOM>,' that 'there is a student <STUDENT>,' that 'course <COURSE> is taken by student <STUDENT>,' that 'teacher <TEACHER> teaches student <STUDENT>,' that 'course <COURSE> is taught by teacher <TEACHER> to student<STUDENT>,'

that 'student <STUDENT> studies in room <ROOM>,' that 'teacher <TEACHER> teaches student <STUDENT> in room <ROOM>,' that 'student <STUDENT> takes course <COURSE> in room <ROOM>,' and that 'course <COURSE> is taught by teacher <TEACHER> in room <ROOM> tostudent <STUDENT>.'

When one deletes that only row, one effectively denies them, every one.
It's an all or nothing proposition. Either all of the atomic formulas
represented by the row are true, or none of them are. That is consistent
with the logical connective between those formulas being IFF rather than
**AND.
**
But what if there is more than one row? The information content of a table
is the logical sum (disjunction) of the information represented by each row.
Isn't it true that

**(P IFF Q) OR (P IFF R) = P IFF (Q OR R)?
**
As a result, denying (P IFF R) in this context doesn't necessarily deny P.

> > The only thing I wonder about is why constraints must be truth-valued. I'd > rather they were allowed to have relation values other than dee and dum.

But those can easily be transformed into into truth-valued constraints, can't they?

> Seems the only way to allow defaults/mandatory tuples without introducing > some other concept. Received on Sat Nov 28 2009 - 11:12:59 CET