Using joins
A join at the physical level is a row-by-row matching of the data between tables. We'll look at some different types of joins and then consider how to leverage them in the physical layer of a data model.
Types of joins
In the physical layer, you may specify the following types of joins:
- Inner: Only records that match the join condition from both the table on the left and the table on the right will be kept. In the following example, only three matching rows are kept in the results:
Figure 13.12: Inner join
- Left: All records from the table on the left will be kept. Matching records from the table on the right will have values in the resulting table, while unmatched records will contain
NULL
values for all fields from the table on the right. In the following example, the five rows from the left table are kept, withNULL
results for any values in the right table that were not matched:Figure 13.13: Left join...