All join relationships supported by Sybase IQ must have a hierarchy. Think of a join hierarchy as a tree that illustrates how all the tables in the join are connected.
Sybase IQ join hierarchies have one table at the top of the tree where the join ends. This table, known as the top table, does not connect to any other tables, although other tables connect to it. The top table always represents the “many” side in a one-to-many relationship.
Depending on the complexity of the join, there could be a straight line of tables down to the bottom of the tree and the beginning of the join, or there could be many branches off to the side as you move down the tree. The following figure shows a join hierarchy with two branches.
Figure 6-1: Hierarchy of a join relationship
In a join hierarchy:
A table can occur only once
A table can only connect out once (one arrow leaving it)
All tables must be connected