| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Idempotence and "Replication Insensitivity" are equivalent ?
pamelafluente_at_libero.it wrote:
>
Actually, also in that case it does.
Let's say we use the "free monoid" formalism to define aggregates. That means we define our aggregation function over collections with elements of type T1 and resulting in a aggregate of type T2 by giving (E, S, A):
- E ; a value of type T1 for the result of the empty collection - S : T1 -> T2 ; a function for the result of the singleton collection - A : T2 x T2 -> T2 ; the aggregation / combination functionsuch that the function A is associative and E the unit of A.
If the collections are bags (or sets) then we require A also to be commutative (and idempotent).
Now supose we are talking about sets (and require A to be associative, commutative and idempotent), the it is clear that you can still give a triple (E,S,A) such that it computes for example the top 5 of the set according to some ordering.
Figuring out the exact trio is left to the reader as an exercise. :-)
![]() |
![]() |