Re: Concurrency in an RDB - another question about recursive definitions

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Sat, 20 Jan 2007 22:18:06 GMT
Message-ID: <yywsh.3324$1x.56377_at_ursa-nb00s0.nbnet.nb.ca>


paul c wrote:

> Bob Badour wrote:
> 

>> paul c wrote:
>>
>>> paul c wrote:
>>>
>>>> Bob Badour wrote:
>>>>
>>>>> paul c wrote:
>>>>>
>>>>>> Bob Badour wrote:
>>>>>>
>>>>>>> ...
>>>>>>> What I am saying is: When you project onto A, the data type of B
>>>>>>> is mostly** irrelevant. Likewise, when you project onto B, the
>>>>>>> data type of A is mostly irrelevant.
>>>>>>>
>>>>>>> The fact that you have a recursive data type definition has no
>>>>>>> effect on project or join or restrict or union or intersect or
>>>>>>> difference etc. The values identified as B are simply values.
>>>>>>>
>>>>>>> Assuming:
>>>>>>>
>>>>>>> A = { a1, a2, a3, a4, a5 }
>>>>>>> B = { {a,b} | a in A and b in B }
>>>>>>>
>>>>>>> Given relation R{a in A,b in B}: /* Using C-style comments */
>>>>>>>
>>>>>>> R = { { a1, { a2, { a3, {} } } } /* a=a1, b={ a2, { a3, {} } */
>>>>>>> , { a4, { a3, {} } } /* a=a4, b={ a3, {} } */
>>>>>>> , { a5, { a2, { a3, {} } } } /* a=a5, b={ a2, { a3, {} } */
>>>>>>> }
>>>>>>> ...
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Bob, now I remember a parallel question that struck me about your
>>>>>> subtle definition of B, B = { {a,b} | a in A and b in B }. I take
>>>>>> it that you meant B to be a type that is used by the R relation.
>>>>>> But is it somehow plausible to see B as a relation?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> B must be a relation type, in fact.
>>>>>
>>>>>
>>>>>> If so, I would think that a value for relation B that has one tuple:
>>>>>>
>>>>>> B = { { a1, {a2, {a3, {} } } } } /* a=a1, b={ a2, { a3, {} } */
>>>>>>
>>>>>> is not possible because by definition (B "referencing" itself),
>>>>>> there would need to be two additional tuples to make it stick to
>>>>>> the definition, namely
>>>>>>
>>>>>> { a2, { a3, {} }
>>>>>>
>>>>>> and
>>>>>>
>>>>>> { a3, {} }.
>>>>>>
>>>>>> Thanks for any comments,
>>>>>> p
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Relations are sets and {} is one of them. Thus {} is a valid B
>>>>> value; although, I omitted the headers for brevity. Joe Thurbon
>>>>> introduced a ...
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Thanks but if this is answering my question, it may be too terse for
>>>> me to see it!
>>>>
>>>> Are you saying that
>>>>
>>>> B = { { a1, {a2, {a3, {} } } } } /* a=a1, b={ a2, { a3, {} } */
>>>>
>>>> is possible, given the self-refencing definition?
>>
>>
>>
>> Yes, it is possible. In fact, the above describes it.
>>
>>
>>>> (Whereas I was thinking that it would be impossible for B to have
>>>> only one tuple.)
>>>>
>>>> p
>>>
>>>
>>>
>>>
>>> Let me change that last comment to:
>>>
>>> (Whereas I was thinking that it would be impossible for B to have only
>>> one such tuple.)
>>
>>
>>
>> How so?
> 
> 
> I thought by those three words "b in B", part of the "B = { {a,b} | a in 
> A and b in B }" definition. In the "tuple" "/* a=a1, b={ a2, { a3, {} } 
> */" I took there to be several "nested" b values, eg., b={ a3, {} } 
> being one.  Would it not need to be "in" B as a tuple in its own right 
> ("unnested", if you will)?  Is this fatuous (I won't be offended if it is)?

{} is in B and has no tuples for b to be a part of
{ a3, {} } is in B and b is an empty set of tuples { a2, { a3, {} } } is in B and b is a relation containing a single tuple Received on Sat Jan 20 2007 - 23:18:06 CET

Original text of this message