Database Reference
In-Depth Information
Figure 10.6
A Right Outer
Join.
Figure 10.6 shows all elements in both sets including all elements in Set
B that are not in Set A. This is the equivalent of a right outer join. Visually,
it is easy to see why the diagram in Figure 10.6 is called a right outer join.
Finally, in Figure 10.7, all elements in both sets are included. This is the
equivalent of a full outer join.
Figure 10.7
A Full Outer Join.
So now we know what types of joins can be performed to join tables or
row sets together. Now let's examine different join types in detail and by
example.
10.3
Examining Different Types of Joins
Let's examine each type of join in turn using specific examples.
10.3.1
Cross-Join or Cartesian Product
A cross-join merges all data from all tables into a single result set regardless
of matching column names or their values. The select statement in Figure
10.8 is a cross-join creating a Cartesian product between the two tables.
Additionally, the SONG and MUSICCD tables are only indirectly related
through the many-to-many join resolution represented by the CDTRACK
Search WWH ::




Custom Search