Re: Guessing?

From: Brian Selzer <brian_at_selzer-software.com>
Date: Wed, 28 May 2008 10:11:10 -0400
Message-ID: <4Kd%j.1646$ZE5.81_at_nlpi061.nbdc.sbc.com>


"paul c" <toledobysea_at_ac.ooyah> wrote in message news:V62%j.172211$Cj7.105689_at_pd7urf2no...
> Brian Selzer wrote:

>> "paul c" <toledobysea_at_ac.ooyah> wrote in message 
>> news:13V_j.168060$rd2.163010_at_pd7urf3no...
>>> Brian Selzer wrote:
>>> ...
>>>> In TTM, Darwin raises objections to such a strict form of 
>>>> orthogonality, and I agree: it's a problem to disallow more than one 
>>>> relationship between things, and in the case of unary relations, it's a 
>>>> problem to disallow something from having more than one property. 
>>>> (Page 436 if you're interested.)
>>>> ...
>>>
>>> Anything Hugh DarwEn says is likely to be important or at least 
>>> provocative, but how does POOD disallow multiple relationships or 
>>> properties?
>>
>> Here's a snippit from page 436, /Databases, Types and the Relational 
>> Model, The Third Manifesto/:
>>
>> <<<<
>>
>>     As applied to 1-tuples, the strong form of orthogonality is 
>> effectively saying that the database should not permit the same thing to 
>> have more than one "property" (a term used by some logicians to 
>> characterize monadic predicates).  Consider, for example, the predicates 
>> "Employee E is on vacation" and "Employee E is awaiting phone number 
>> allocation."  What more natural way is there of representing those than 
>> defining two unary relvars with those very predicates?
>
>

> I'm all for natural when it comes to the pleasures of the flesh and
> willing to put up with it when it comes to the unavoidable emotions but
> tantalizing motives can lead to insidious effects at times. The logic
> that a dbms follows may have a long lineage, but that doesn't make it
> natural.
>
>

> Presuming the example is hinting at a union view for employees who are
> unavailable by 'phone and that Employee is the preferred (or 'natural' if
> you like) attribute name then I'd say the person who defines that view
> without any precautions might be asking for trouble, at least according to
> people who think inserting to both base relations would pervert their
> predicates. If that's what you're driving at, I still don't see why the
> dbms should be held responsible - that would be a...-phizing the dbms once
> again! (I find it easier to type pteradactyl than that word of Bob B's.)
>
>

> If somebody wants to insist that those base predicates are natural, then
> presumably they would call inserting to both base relations 'unnatural'.
> But I would have a hard time agreeing with a prohibition against a
> consistent logic on the grounds that it is thought to be 'unnatural'! Now,
> 'useless' is quite another matter.
>

I think you're misapplying Darwen's use of the word 'natural.' That one design is more asthetically pleasing than another says nothing whatsoever about whether the underlying logic is consistent or not. The choice here is between a design based upon the disjunction of two unary predicates and one based upon a single disjunctive predicate. The former has one relation for each unary predicate; the latter has everything stuffed into one relation but requires the addition of a flag attribute in order to force exclusivity (i.e. x /\ ~y | ~x /\ y | x /\ y).

Stuffing everything into one relation may at first glance appear to simplify when in fact it actually complicates. Consider, for example, the following equivalent schemata:

P{X}
Q{X}
R{X, Y} R[X] references P[X]

as opposed to

S{X, F} F IN {1, 2, 3}
T{X, Y} T[X] references (S WHERE F = 1)[X]

Note that the foreign key in the former becomes much more complex in the latter. I think, therefore, that the KISS principle would argue that disjunctive predicates for relations should be avoided whenever possible. Received on Wed May 28 2008 - 16:11:10 CEST

Original text of this message