O'Reilly logo

The Relational Database Dictionary, Extended Edition by C. J. Date

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. B

bag Very loosely, a "set" that permits duplicates; more precisely, a collection of objects, called elements, in which the same element can appear any number of times. An example is the collection (y,y,x,z,y,z), which can equivalently be written as (x,y,y,y,z,z), since bags, like sets, have no ordering to their elements. The number of times a given element appears in a given bag is the multiplicity (of that element with respect to that bag).

The set theory operations of inclusion, union, intersection, difference, and product (but not complement) can all be generalized to apply to bags. First, inclusion: Let b1 and b2 be bags, and let element x appear exactly n1 times in b1 and exactly n2 times in b2 (n1 0, n2 0). Then bag b1 includes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required