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

From: Tegiri Nenashi <TegiriNenashi_at_gmail.com>
Date: Tue, 10 Nov 2015 11:14:55 -0800 (PST)
Message-ID: <90cf3868-276a-473d-ae49-74881ab931a9_at_googlegroups.com>


On Thursday, November 5, 2015 at 3:08:19 AM UTC-8, Nicola wrote:
> ... : are there good arguments
> against (or in favor of) 0-ary predicates in database design? In a
> nested relational database design I'd tend to prefer factoring out
> 0-ary predicates into a separate 1NF schema. If you ask me why, well, I
> posted exactly because I'm trying to find compelling arguments :)

In every single database schema I have seen the design with boolean datatype was inferior to "normal" domain: - isManager in your example is clearly less informative than employees hierarchy - The design with isCreditWorthy boolean attribute literally begs for credit score https://vadimtropashko.wordpress.com/2010/09/16/on-boolean-datatype-in-sql-and-beyond/

It is up to proponents of Boolean datatype to exhibit schema where their schema design is superior.    

> ... 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.

Is it really that different from constraints & normal forms? If you impose FD id->isManager then you guarantee no contradiction. If you demand PK(id), then you add more consistency.

> ... (*) 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.

I noticed nothing special there: in conclusion to that paper the author stipulates that domain cardinality is greater or equal to 2. Received on Tue Nov 10 2015 - 20:14:55 CET

Original text of this message