Creating relationships between tables

Relationships can exist between one or more fields in one table and the same number of fields in a second table. A relationship between more than one field in each table is called a compound relationship. Relationships can exist between different fields of the same table but this is far less common.

In iBridge Designer, a relationship can be many-to-one. This means that several records in one table refer to a single record in another table.

Note: One-to-one relationships are not supported in iBridge Designer. If an existing one-to-one relationship is encountered during validity checking then a warning message will be displayed, that you change the relationship to many-to-one.

The original designer of the database may have specified relationships between keys in one table and foreign keys in another table. If so, these relationships will be suggested to you as you drag the relevant tables onto the Database panel. You can choose to confirm any suggested relationships and you can also create your own.

Creating simple relationships

To create a relationship, drag the required foreign key field from one table across to the required candidate key field in the second table.

When you are creating a many-to-one relationship, you must be sure of creating it the right way round. Drag the relationship from the many end and release it on the one end.

Creating compound relationships

To create a compound relationship:

  1. Create simple relationships (described above) between pairs of fields in the two tables.
  2. Select each of these simple relationships by clicking on the first relationship and then Ctrl-clicking on the remaining relationships that you wish to include.
  3. Right-click on one of the selected relationships and select Merge Relationships.