Using the External Schema Wizard Relationship Dialog

When you have selected a relationship line between two columns on the Define References sheet and clicked the Add button or the Edit button, the External Schema Wizard Relationship dialog is then displayed.

An example of the External Schema Wizard Relationship dialog is shown in the following image.

A reference property is a one relationship and a collection property is a many relationship. If a property defining the relationship is not a collection, only one reference is allowed. The collection can be an array, a set, or a dictionary with member keys.

All references are read-only, and all relationships between two ExternalObject subclasses are explicit inverse relationships; that is, you must define one reference for each side of the relationship.

The Left Side group box and Right Side group box represent the two sides of the relationship and correspond to the two classes that you selected in the Define References sheet. Each group box displays the selected class and a generated reference name.

The Implementation group boxes enable you to select the type of collection that is to be used to implement a many-sided relationship. The display area at the lower right of the dialog describes the selected relationship in terms of relational tables and columns.

The classes selected in the Define References dialog are displayed in the Class list boxes. Values that cannot be altered are disabled. For details about JADE references, see "Adding a Reference Property", in Chapter 4 of the JADE Development Environment User’s Guide.

To add or change a reference

  1. If you do not want the generated default cardinality for your reference, select the appropriate option button in the Cardinality group box.

    Change the cardinality to indicate a many-sided relationship, if required. The Implementation group box on the corresponding side of the relationship is then enabled and the name of a reference on that side of the relationship is replaced with the plural form of the name if you have not yet edited the reference on that side of the relationship.

  2. If the generated default names are not suitable, change the names displayed in the Name text box of the Left Side group box and Right Side group box.

  3. If an Implementation group box is enabled for either side, change the collection type by selecting the appropriate option button, if required.

    Any collections that match the selected implementation option are displayed in the Collection combo box, with the list box portion displaying the first match. Select another collection that matches your selected implementation, if required.

  4. In the Relationship Type group box, select the appropriate option button to specify the composition semantics that you require. The relationship is between instances of two classes.

    A peer-to-peer relationship is an equivalent relationship between two objects. A parent-child relationship is a relationship in which the child object belongs to, or is subsidiary, to the parent object. This enables you to capture additional semantic information only; for example, for modeling purposes.

    There is no enforcement of deletion semantics, as the instances do not reside in the JADE database. (For details, see "Object Lifetimes", in Chapter 2.)

    In an external database schema, child objects are not automatically deleted when a parent object is deleted. (This differs from the JADE implementation.)

  5. Click the OK button when you have defined your references. (Alternatively, click the Cancel button to abandon your selections.)

When you click the OK button (and you confirm that you want to use an existing reference, if required), the Define References sheet is then displayed, to enable you to define more references or to proceed to the next step of the External Schema Wizard.