Relational Algebra - Union operator

1 - About

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:

3 - Symbol

3.1 - Set

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

Sql equivalence: (union)

3.2 - Bag

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

Sql equivalence: (union all)

4 - Example

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

5 - Documentation / Reference


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap