| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: bags vs. sets
On May 15, 6:21 pm, Bob Badour <bbad..._at_pei.sympatico.ca> wrote:
> Vadim Tropashko wrote:
> > x*(x-1)*(x-1) = 0
>
> > The root x=1 is counted with its multiplicity 2.
>
> Is the bag 0, 1, 1 the same as 1, 0, 1 ?
Yes they are.
> > The question is if counting fits naturally into logical level. It may
> > be argued that combinatorics, arithmetics, and many other areas escape
> > logical level. Bags are not idempotent, perhaps they are better
> > suitable for counting.
>
> If one has sets of tuples, counting fits naturally. The above example
> would use tuples with a root and a multiplicity.
Counting is better done with bags, because bags are like numbers in unary system. However, except for this observation and equation roots example I don't have really good case when one may need them. In fact, when programming in Java Sets and Lists appears to be the only structures one need.
Yet, Marshall's question applies to lists too. If we don't need bags, perhaps we no longer need lists too? Received on Tue May 15 2007 - 20:29:45 CDT
![]() |
![]() |