Re: Question about Date & Darwen <OR> operator
Date: Sun, 4 Sep 2005 07:36:11 -0400
Message-ID: <2oCdnZ2dnZ1_aPeinZ2dnblBh96dnZ2dRVn-yJ2dnZ0_at_comcast.com>
"paul c" <toledobythesea_at_oohay.ac> wrote in message
news:0srSe.365651$s54.327635_at_pd7tw2no...
> VC wrote:
>> "paul c" <toledobythesea_at_oohay.ac> wrote in message
>> news:Pb6Se.67282$Hk.4881_at_pd7tw1no...
>>
>>>the bit on pg 56 ...
>>>Hs = Hr1 union Hr2
>>>Bs = {ts: exists tr1 exists tr2
>>>( ( tr1 in Br1 or tr2 in Br2) and
>>>ts = tr1 union tr2 }
>>
>>
>> If the above is indeed the <OR> definition, then I do not understand how
>> it handles relations with the same header..
>>
>> Let a tuple be a set of triples <A, T, v> (attribute, type and value).
>> Further, let r1 and r2 be relations with the same header H. Now, what
>> would be the result of tr1 union tr2 ? Obviously it's not a relational
>> tuple any more because there are two attributes with the same name in the
>> union. E.g.
>>
>> tr1 = { <x,int,4>, <y, char,'a'}
>> tr2 = {<x,int,5>, <y, char,'b'}
>>
>> tr1 union tr2 = { <x,int,4>, <y, char,'a'>, <x,int,5>, <y, char,'b'> }
>>
>> What am I missing ?
>>
>>
>
> A friend of mine who has a couple of math degrees and who I think is
> pretty smart in many areas, had almost exactly the same problem with the
> definition. My friend's example was similar to yours except that some
> attributes or tr1 and tr2 were disjoint. A couple of years ago, he told
> me that he had written to one of the authors suggesting a change but that
> he got no reply.
>
> Since then, Alfredo on this group has clarified the meaning for me but not
> in a way that I am able to reconcile with the definition as written. I've
> just assumed that's because of either my lack of mathematical training or
> my stupidity or more likely, both.
>
> For all I know, you aren't missing anything. I wish the
> mathematicians/philosophers in the group would help me as well as you to
> reconcile the definition, too. The way I've been coping is to change the
> last bit, " and ts = tr1 union tr2" to "ts *is a member of* tr1 union tr2"
> but this seems a little redundant.
>
> It occurred to me that the use of the term "ts" means a set of tuples
> rather than one tuple.
Hold on right there. Let's not complicate the things. The notation defining <OR> is a straightforward set definition where the variables range over elements of set(s) that happen to be tuples. If you twist the meaning in the way you suggest, it completely deviates from the standard math practice.
> After all, Bs is defined as a set of tuples, but this still seems to me to
> make that part " and ts = tr1 union tr2" redundant to my unpracticed eye,
> ie. if it were removed, what difference would it make?
The 'ts = tr1 union tr2' is crucial. It says that you obtain the resulting tuple ts by taking a tuple from the "universl set" corresponding to the r1 header and a tuple from the "universal set" corresponding to the r2 header and applying the union operation to them. Unfortunately, the definition you've supplied does not state those"universal sets" explicitely:
Bs = {ts: exists tr1 exists tr2 ( ( tr1 in Br1 or tr2 in Br2) and ts = tr1 union tr2 }
It can be rewritten as :
Bs = {ts: exists tr1 in Ur1 exists tr2 in Ur2 ( ( tr1 in Br1 or tr2 in Br2) and ts = tr1 union tr2 }
where Ur1/Ur2 is a set of tuples formed by all possible combination of values for a given header (a sort of universl set for a given header).
So the formula ts = tr1 union tr2 defines a sort of "cartesian product" between the universal sets of which tr1 and tr2 are members (it's not really a cartesian product of course). Then you can think about the condition (tr1 in Br1 or tr2 in Br2) as a sort of filter applied to 'tr1 union tr2'.
Maybe, the definition would be more undestandable if written , semiformally, without the quantifiers as:
Bs = {tr1 union tr2: (tr1 in Br1 and tr2 in Ur2) or (tr2 in Br2 and tr1 in Ur1) }
> In fact, the first time I read it, I concluded, apparently wrongly, that
> <OR> and <AND> both produce the cartesian product when the headings are
> disjoint.
Well, for disjoint sets of attributes <AND> produces a cartesian product of the relations all right. What <OR> produces was explainedby I believe Mr. Spight. The problem for both <OR> and <AND> are intersecting attributes.
> I still wonder whether this wouldn't sometimes be a useful identity.
>
> Not much help, I'm sure.
Can anyone give at least an informal definition of what <OR> and <AND> are since the formal one (as quoted ) appear rather nonsensical ? Without such definition any discussion is nonsensical too.
>
> p
>
>
>
Received on Sun Sep 04 2005 - 13:36:11 CEST