Re: Love or hate, or? domains with cardinality two
Date: Thu, 5 Nov 2015 12:08:15 +0100
Message-ID: <n1fdb0$1i6u$1_at_adenine.netfront.net>
On 2015-11-03 20:56:26 +0000, Tegiri Nenashi said:
> Are you comfortable with nested relations? If you do, then boolean
> domains should be allowed, because booleans are propositional values,
> while propositions are 0-ary predicates.
I'd like to point out that I'm not against boolean domains per se, e.g., in SQL it is perfectly fine to ask something like:
select exists (select 1 from T);
or
select location, temperature < 10 from Weather;
Note also that my problem is not related to the cardinality of the domain per se - domains of cardinality two do not have anything special (*) -, but to a specific interpretation of the two values of the domain that is constrained so as mimic the true and false truth values.
So, it is the use of such boolean values in base relations that leaves me a bit perplexed. 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 you just represent only one kind of information. This leads to situations in which you must guarantee some coherence (at least one of (x,true) or (x,false) must be present in a valid instance), as I have noticed in a previous post. On the other hand, in a case like Employee(id, dept, mgr?) such coherence is guaranteed "by construction" (unless you allow null values in mgr?...).
Nicola
(*) It occurred to me that in Fagin's "A Normal Form for Relational Databases That Is Based on Domains and Keys" he considers the "combinatorial consequences of bounded domain sizes". It was something about some logical equivalences not holding when domains of nonprime attributes are "too small". But I don't recall all the details. Maybe, rereading that paper will give me some insight.
- news://freenews.netfront.net/ - complaints: news_at_netfront.net ---