# Relational Operator - Cross Product

The set cartesian product applied to a set of row (ie a tables) create all pairs of tuples (row).

A cross-join (also called Cartesian join) occurs when a request does not have a join condition between two tables. We say that the inner table is not driven from (not dependent on) the outer table.

That creates a cartesian product of the tables involved in the join. The size of a cartesian product is the number of rows in the first table multiplied by the number of rows in the second table.

In other word, if the inner table's access path is independent of the outer table, then the same rows are retrieved for every iteration of the outer loop.

The cartesian product in named for Rene Descartes.

## 3 - Symbol

A cross (times) $$\LARGE R1 \times R2$$

where:

• the x character is:
• in latex: \times

## 4 - Size

The size of this cross-join is then the size of the first table (R1) multiplied by the size of the second table (R2).

## 5 - Example

### 5.2 - Sql

Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry