Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: What is Aggregation? Re: grouping in tuple relational calculus

Re: What is Aggregation? Re: grouping in tuple relational calculus

From: Vadim Tropashko <vadimtro_invalid_at_yahoo.com>
Date: 18 Feb 2005 17:16:17 -0800
Message-ID: <1108775777.801768.322550@o13g2000cwo.googlegroups.com>


Mikito Harakiri wrote:
> All of them -- sets, bags, and lists -- have their place in RM. The
> importance is shifted heavily toward the left side: bags are only
important
> in the context of aggregation, and lists are even less important as
the
> "order by" SQL clause is virtually the only usage for them.
>
> Once again, if we loose accociativity, then we have to expand our
semantics
> spectrum to admit trees
>
> sets, bags, lists, trees
>
> This progression is natural:
> sets -- idempotent, commutative, associative
> bags -- nonidempotent, commutative, associative
> lists -- nonidempotent, noncommutative, associative
> trees -- nonidempotent, noncommutative, nonassociative

Here is a little bit different perspective.

A set is a bag that has its all element counted once only. A bag is a list that has its element ordered.

In other words, aggregation (with group by) maps a category of bags into sets. For example,

select figure from
{circle, circle, square, triangle}
group by figure

is a projection of a bag

{circle, circle, square, triangle}

into a set

{circle, square, triangle}

Likewise, ordering is a mapping of lists into bags. E.g.

select figure from
circle->square->circle->triangle
order by figure

would produce a bag

{circle, circle, square, triangle} Received on Fri Feb 18 2005 - 19:16:17 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US