Loop Traps

A loop or cycle is present in the physical view of a data model when multiple possible paths exist from table A to table B. A loop can exist as a self-join or multiple join path. Style Studio automatically highlights these loops in red.

 

For example, when an “Employee” table contains a “manager id” is joined to itself (i.e., to indicate an employee's manager), this produces a self-join loop. You must resolve the self-join to allow end users to find employees and their respective managers. Self-join loops are most easily resolved by creating a table alias. (See Resolving Loop Traps for details.)

 

A multiple-table loop has the potential to create results that are too restrictive. For example, consider an order table (A) that joins to the “ship to” table (B) and the “bill to” table (C), which in turn joins to a “company” table (D). If end users select fields from all four tables, only orders that have the same company for “bill to” and “ship to” will be returned.

Multi-table loops can be addressed using aliasing or auto-aliasing. Additionally, these loops can be addressed by using a weak join which will not be included in the join path of the resultant query. (See Resolving Loop Traps for details.)

 

<< 4.3.3 Identifying Query Traps © 1996-2013 InetSoft Technology Corporation (v11.5) Fan Trap >>