Relational Algebra - Union operator

Relational Algebra Between Sql And Query Plan


The union operation will takes two relations that are union-compatible (ie both relations have the same number of fields with the same types and returns all Tuples appearing in either relation (in Rel 1 or in Rel 2)

An union performed:



Set Union (no duplicate allowed - ie distinct) <MATH> \begin{array}{c} \LARGE R_1 \cup R_2 \\ \end{array} </MATH>

Sql equivalence: (union)


Bag Union (duplicate allowed) <MATH> \begin{array}{c} \LARGE R_1 \uplus R_2 \\ \end{array} </MATH>

Sql equivalence: (union all)


Select the blue and red shirt <MATH> \LARGE \sigma_{(color=Blue)} \text{Shirts} \cup \sigma_{(color=Red)} \text{Shirts} </MATH> where:

Documentation / Reference

Discover More
Data System Architecture
Logical Data Modeling - Duplicate

A duplicate happens when in a set two elements have an equivalence relationship that returns true. In the set {1,1,2,3}, 1 is a duplicate The set {1,2,3} has no duplicate relational operators...
Card Puncher Data Processing
PowerCenter - Union Transformation

in Powercenter.
Relational Algebra Between Sql And Query Plan
Relational Algebra - Expression and Operators

Relational algebra is based upon the fact that you can pass tabular data through a set of data operators (select, filter, join, sort, union, etc.) in a algebraic structure. It means that: the output...
Data System Architecture
SQL - Joins (Home)

in SQL. A join is a SQL clause statement which define the set operation such as: intersection, union, that the database must perform between two or more relation (table, view, query, ...). The...
Venn Diagram
Set Theory - Union

Set Theory - Union
Data System Architecture
Sql - Union

in SQL. Example in oracle:

Share this page:
Follow us:
Task Runner