Re: Objects and Relations
From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Tue, 30 Jan 2007 22:04:58 GMT
Message-ID: <eiPvh.167$R71.2780_at_ursa-nb00s0.nbnet.nb.ca>
>
> No. The parenthesized elements within the braces can be reordered;
> the elements of the ordered tuple within the parentheses cannot.
>
> This *would* be equal:
>
> { (2, 'b'), (0, 'b''), (1, 'o') }
>
> We can consider an alternative form, in which each attribute
> is explicitly named in each tuple. Using "#" as the index name
> and "c" as the character name:
>
> { (#=0, c='b'), (#=1, c='o'), (#=2, c='b') }
>
> which would be equal to something similar to what you asked about:
>
> { (#=2, c='b'), (c='b', #=0'), (c='o', #=1) }
>
>
>
> Elements of a set have no order.
Date: Tue, 30 Jan 2007 22:04:58 GMT
Message-ID: <eiPvh.167$R71.2780_at_ursa-nb00s0.nbnet.nb.ca>
Marshall wrote:
> On Jan 30, 11:43 am, "Neo" <neo55..._at_hotmail.com> wrote:
>
>>>>what is a relational expression for the string bob? >> >>>{ (0, 'b'), (1, 'o'), (2, 'b') } >> >>Is the following relationally equivalent? >> >>{ (2, 'b'), ('b', 0'), ('o', 1) }
>
> No. The parenthesized elements within the braces can be reordered;
> the elements of the ordered tuple within the parentheses cannot.
>
> This *would* be equal:
>
> { (2, 'b'), (0, 'b''), (1, 'o') }
>
> We can consider an alternative form, in which each attribute
> is explicitly named in each tuple. Using "#" as the index name
> and "c" as the character name:
>
> { (#=0, c='b'), (#=1, c='o'), (#=2, c='b') }
>
> which would be equal to something similar to what you asked about:
>
> { (#=2, c='b'), (c='b', #=0'), (c='o', #=1) }
>
>
>>According to set theory, is the ordering of a set's elements relevant, >>required or allowed?
>
> Elements of a set have no order.
A quibble: A set imposes no implicit order on its elements and order has no effect on the value of a set. The elements themselves, however, can have as many orders as one has collations for them.
If a syntactic form of a set
> has order (which it will, because syntax has implicit order)
> then that order has no meaning.
And one is free to physically order things for performance however it suits one regardless of the syntactic order used.
/amplification Received on Tue Jan 30 2007 - 23:04:58 CET