Joins

A join combines columns from two relational tables using an operator to compare the columns. A join uses attributes that reference columns in the tables being joined.

The simplest form of a join uses two attributes: one that maps to a column in the first table and one that maps to a column in the second table. You also specify an operator to indicate how the columns are compared. For example, Time ID = time_id.

A join can also model composite joins where two or more columns from the first table are joined to the same number of columns in the second table. A composite join uses pairs of attributes to map corresponding columns together. Each pair of attributes has an operator that indicates how that pair of columns is compared. For example, Customer Number = customer_number AND Store Number = store_number.

A join also has a type and cardinality. The join types map to relational join types. Joins are primarily used to join the cube dimensions to the relational tables. Joins can also be used to join dimension tables together in snowflake schema.

The most common type of join is the one-to-many equality join.