Relational Algebra - Intersect operator (intersection)

1 - About

intersect (or intersection) is a relational operator that returns the intersection of two relation A and B, denoted by A ∩ B.

An intersection is defined as all tuples (rows) that are present in both of two union-compatible (same columns and same type) relation A and B.

The following definition are also equivalent.

  • all elements of A that also belong to B
  • all elements of B that also belong to A

3 - Visualisation

4 - Syntax

4.1 - Minus

A derived operator using minus (-) where the minus expression <math>( R1 - R2 )</math> returns anything that is only in R1

<MATH>\Large R1 \cap R2 = R1 - ( R1 - R2 ) </MATH>

4.2 - Join

  • Derived using join

<MATH> \Large R1 \cap R2 = R1 \times R2 </MATH>

5 - Documentation / Reference

Data Science
Data Analysis
Data Science
Linear Algebra Mathematics

Powered by ComboStrap