Re: A Logical Model for Lists as Relations

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Wed, 10 May 2006 16:35:58 GMT
Message-ID: <ODo8g.5953$A26.151290_at_ursa-nb00s0.nbnet.nb.ca>


Jay Dee wrote:

> Marshall Spight wrote:
>

>> I am interested in the question of how best to handle lists in a
>> relation-oriented world. I have considered various approaches,
>> usually oriented around adding a list collection type.

>
> Why not simply use a relation?
>
>> But a list can be described as a relation. Most simply, an infinite
>> list is a relation from the natural numbers to the target set,
>> and a finite list is a relation from some finite contiguous subset
>> [0..n] of the naturals to the target set. Generalizing, we could
>> describe an n-ary list as a relation with an index attribute and
>> zero or more other attributes.

>
> I think not. Relations are sets, lists aren't. The naturals -
> which don't include zero, by the way - are a set, lists aren't.
> You may be able to associate ordinal positions of elements in
> a non-empty list to the naturals, but that's about it.
>
> For lists, you need bunch theory, not set theory. For the ordered
> lists you seem to be describing, use relations; it sounds like an
> ordinal attribute might be the key to the solution you're seeking.

Since it is relatively easy to write a query that extends a relation with a rank per any explicit order, I am not even sure the ordinal attribute is required. Received on Wed May 10 2006 - 18:35:58 CEST

Original text of this message