Re: Concurrency in an RDB - another question about recursive definitions
Date: Sun, 21 Jan 2007 15:15:00 GMT
Message-ID: <UrLsh.748404$5R2.119557_at_pd7urf3no>
(Sorry for the hack snip job following)
 
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.
>>>>>>>>
>>>>>>>> ...
>>>>>> B must be a relation type, in fact.
>>>>>> ...
>>>>>> 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 ...
>>>>> ...
>>>>> 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 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 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
Given relation : B = { {a,b} | a in A and b in B } /* Using C-style comments */
B = { { a1, { a2, { a3, {} } } } /* a=a1, b={ a2, { a3, {} } */
      , { a4, { a3, {} } }            /* a=a4, b={ a3, {} } */
      , { a5, { a2, { a3, {} } } }    /* a=a5, b={ a2, { a3, {} } */
     }
If you say that this is patent nonsense because I have defined a domain for only one of the two attributes in the relation and then proceeded to define the relation, I can accept that (since I would guess that Codd might have called it absurdly out-of-bounds).
On the other hand, if this kind of trickery is logically possible and assuming that "is in" means "is member of" then I think I could say that, for one, the tuple { a2, { a3, {} } } is not in B and the above set of three B-tuples is an impossible value for B!
I don't know that there is a reason for this that leads anywhere useful, I was only trying to dot a few i's.
p Received on Sun Jan 21 2007 - 16:15:00 CET
