# Union

1. <set theory> An operation on two sets which returns the set of all elements that are a member of either or both of the argument sets; normally written as an infix upper-case U symbol.

The operator generalises to zero or more sets by taking the union of the current partial result (initially the empty set) with the next argument set, in any order.

For example, (a, b, c) U (c, d, e) = (a, b, c, d, e)

2. <programming> A type whose values may be of one of a number of other types, thet current type depending on conditions that are only known at run-time.

A variable of union type must be allocated sufficient storage space to hold the largest component type.

Some unions include extra information to say which type of value the union currently has (a "tagged union"), others rely on the program to keep track of this independently.

A union contrasts with a structure or record which stores values of all component types at once.

3. <database> An SQL operator that concatenates two result sets, that must have the same number and types of columns. The operator may be followed by the word "ALL" to indicate that results that appear in both sets should appear twice in the output.

< Previous Terms |
Terms Containing union |
Next Terms > |

Unify Corporation Unihan uninstaller uninteresting Uninterruptible Power Supply |
ACCLAIM aggregate type algebraic data type Axiom of Choice Boolean algebra |
Unipalm Group plc Unipress Software, Inc. uniprocessor UNIQUE Unique ID Listing |