Re: Guessing?

From: paul c <toledobysea_at_ac.ooyah>
Date: Wed, 28 May 2008 15:28:51 GMT
Message-ID: <TSe%j.302043$pM4.279613_at_pd7urf1no>


Brian Selzer wrote:
> "paul c" <toledobysea_at_ac.ooyah> wrote in message
> news:V62%j.172211$Cj7.105689_at_pd7urf2no...
>> Brian Selzer wrote:
...
> 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. ...

If you're right and he didn't have aesthetics in mind, he could have not said 'natural'. If you're wrong, maybe he had aesthetics in mind, which would seem mystical to me.

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

Yes, and when you ask the dbms 'is x true?' (in the union), you don't need to qualify by asking 'is x true and y untrue or is x true and y true?'. Asking 'is x true?' is enough. Same goes for any expression that joins the query's relation with the view. That is the character ('character' sounds anthropomorphic but I don't mean it that way, wanted to say 'nature') of the operation that forms the union. Your 'flag attribute' is effectively redundant and 'or' has in effect been removed from the predicate.

(as maybe not everybody knows, the algebraic answer to 'is x true?' is not necessarily 'yes', more conventionally it is a relation containing a tuple that stands for the 'x' proposition although Darwen has shown that an algebraic query could be written to produce 'yes' or 'true'.)

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

That seems to be part of an argument about something else. Received on Wed May 28 2008 - 17:28:51 CEST

Original text of this message