Re: Love or hate, or? domains with cardinality two
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.
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.
philip Received on Fri Nov 06 2015 - 11:40:53 CET