A script-enabled browser is required for this page to function properly.

Creating a composite relationship (Query Builder)

A composite relationship connects two or more columns in one table with columns in another table. For example, you might relate the columns Order ID and Item ID in the Items table with identically named columns in the Item List table.

You can use as many composite relationships as are appropriate for your query. In addition, you can include columns in composite relationships regardless of whether they are used in other relationships.

To create a composite relationship:

  1. In the Query window, click the Select Data Tables button in the Icon Bar.
  2. Include the two tables you want to join.
  3. Select the column (either select the check box next to the column, or double-click the column name) you want to relate (the foreign key).
  4. While holding down the mouse button, drag the cursor to the related column in the second table (the primary key).

Notice that the cursor traces out a relationship line as you do so.

  1. Once the target column is highlighted, release the mouse button to anchor the relationship line.

By default, the relationship is inactive (the line appears gray).

See also

About Query Builder relationships

 

Activating and deactivating a relationship (Query Builder)

 

Creating a self-relationship (Query Builder)

 

Creating a simple relationship (Query Builder)

 

Creating an unmatched relationship (Query Builder)

 

Deleting a relationship (Query Builder)