Re: Love or hate, or? domains with cardinality two

From: <compdb_at_hotmail.com>
Date: Fri, 6 Nov 2015 02:40:53 -0800 (PST)
Message-ID: <8accf3d8-535d-47a7-bcfc-51c92c5110cd_at_googlegroups.com>


On Thursday, November 5, 2015 at 3:14:51 AM UTC-8, Nicola wrote:
> On 2015-11-05 11:08:15 +0000, Nicola said:
>
> > In a relation with a boolean attribute you are effectively using a
> > trick to encode both positive and negative information (true and false
> > propositions), while typically in a relation schema...

There isn't anything different about boolean attributes than any other attributes. Your problem is you are not writing your predicates correctly.

For EM(x,b) for your first example the predicate is

       x is an employee and b and x is a manager     or x is an employee and not b and x is not a manager which is

    x is an employee and it is b that x is a manager

The fundamental theorem of the relational model: If every base holds the rows that make its predicate true then every expression holds the rows that make its predicate true. (Where the predicate of a JOIN is the AND of its arguments' predicates, of a UNION, OR, of a MINUS, AND NOT, of PROJECT all-but-X, EXISTS X, etc.)

So present tuples assert their propositions and absent tuples assert NOT their propositions. (Because of the second conjuct we say we are making the CWA.)

So the proposition for <fred,true> is "fred is an employee and fred is a manager". When in the relation it asserts that and when not it asserts NOT that.

The more "relational" design is

    E(x) x is an employee
    M(x) x is a manager

Each base asserts its proposition per its present and absent tuples.

If you write these predicates in terms of the above predicates you get the predciate for the corresponding view relation expression. Which also maps values and constraints from the EM schema to the other.

In your Schrodinger P(x,b) example you suggested that the predicate was:

        b and x is a cat
    or not b and x is not a cat

But that does not hold the rows you think it would. <c1,true> is in P iff c1 is a cat. Etc for c2,... . But <c1,false> is in P iff c1 is a cat, ie iff <c1,true> is not in P. Etc for c2,... . Ie every c has exactly one row in P.

This is in response to your first post. See what you can make of your others now. See also comp.databases.theory posts signed by me re the relational model & predicates.

PS
Why do you even mention DKNY? It holds when a table can hold any value per its heading. That's the case or it isn't. It doesn't have anything to do with the sequence of normal forms implied by PJ/NF per se.

philip Received on Fri Nov 06 2015 - 11:40:53 CET

Original text of this message