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

From: Nicola <nvitacolonna_at_gmail.com>
Date: Fri, 6 Nov 2015 18:45:51 +0100
Message-ID: <n1ip0e$foh$1_at_adenine.netfront.net>


On 2015-11-03 22:13:18 +0000, James K. Lowden said:

> On Mon, 2 Nov 2015 18:29:54 +0100
> Nicola <nvitacolonna_at_gmail.com> wrote:
> 

>> Employee(id, dept, mgr?)
>>
>> where mgr? is boolean. A tuple (x,y,true) means that employee x
>> belongs to department y and x is a manager of y. A tuple (x,y,false)
>> means that employee x belongs to department y but x is not a manager
>> of y.
>>
>> I was arguing about how schemas like that are commonly found in
>> practice, and about how I feel uncomfortable with them, because, let
>> apart the obvious difficulties with enforcing some integrity
>> constraints (e.g., a department should have one and only one manager
>> at a time) in current DBMSs, truth of a predicate is coded as a value
>> of a domain. Suprisingly (for me), she did not dismiss the approach
>> at once, but pointed out that you are trading a predicate (Manager
>> (id)) for a couple of new constant symbols and the two things should
>> be essentially interchangeable (from a logical point of view).
> ...

>> But maybe my intuition is wrong. What do you think? Are there
>> compelling reasons to avoid boolean domains in logical database
>> design?
>
> At a logical level, there's nothing to argue about, right?

Right. I hoped there was something (related to CWA vs OWA, 3VL, logical negation, or something else), but apparently there is not.

> I think your intuition is nevertheless correct for two practical > reasons. [...]

I agree with those. It seems that arguments in favor or against boolean attributes are eventually just pragmatic.

Nicola

Received on Fri Nov 06 2015 - 18:45:51 CET

Original text of this message