The Relations and other panes


Figure 1.6. Showing the Relations pane

We describe next the Relations, Columns and SQL panes, which work together to assist the user in creating queries. The Relations pane is used to visually add table or view objects to the query by simply dragging from the DB Browser pane and dropping them into the Relations pane (see Figure 1.6 for details). Once such objects are in the Relations pane, the user may relate fields between objects via drag-drop method. In addition, to the relation or join line being drawn when fields are related, the user may use the right-mouse button clicking on the join line node. This will display the popup menu with the following menu items:

Remove

This menu item will remove the selected relation or join line from the Relations pane,

Select All Rows from <object_name>

This menu item will define the join type (i.e. INNER or OUTER) by selecting all rows from the left side of the join line,

Select All Rows from <object_name>

This menu item will define the join type by selecting all rows from the right side of the join line,

Properties...

This menu item will display the Join Line Properties dialog for further specifics about the relation (see Figure 1.7 for more details),

Note that the Select All Rows from <object_name> are toggle menu items, where the object_name is the name of the object at the respective start or end of the join line. The first menu item from these Select All Rows from <object_name> menu items defines the join to be LEFT OUTER JOIN if checked, while the second will make the join to be RIGHT OUTER JOIN. If neither of these menu items is checked then the join becomes INNER JOIN.


Figure 1.7. Showing the Join Line Properties dialog

The Join Line Properties dialog may be used for further specifics about the join relation. For example, defining the operator between the related fields, as well as the join type (i.e. INNER, OUTER, LEFT, RIGHT or FULL).

The following are all possible operators between related fields:

            { =, <>, <, <=, >, >= }.

The default operator is the equality operator, in which case the diamond node of the join line does not show the operator symbol. In all other cases the operator symbol will be shown in this diamond node.