To add a database table relation

  1. In the Table Relations window, click Add.
  2. Make the following settings:
    ID:

    This is a unique identifier for the relation entry. No two relations can share the same ID. The IDs are used only within your application; they do not reference any particular values in your data source.

    Primary Table:

    This is the name of the primary table for the relation.

    Primary Key:

    This is the name of the key field for the primary table. This field must either itself hold a unique value for each entry in the primary table, or be part of a compound key in which two or more fields are combined to establish unique entries.

    Foreign Table:

    This is the name of the foreign table for the relation.

    Foreign Key:

    This is the name of the field from the foreign table that holds values that map to primary key values, thereby relating one or more records from the foreign table to a single unique record in the primary table. This is not the key field for the foreign table itself. Because several records from the foreign table can be related to a single primary record, foreign key values are not necessarily unique in the foreign table.

  3. Click OK.