When you first work with the ORM modeling solution, the tool
applies various default settings to determine how it displays the
user interface, and how it reacts to certain
To access this dialog, choose Database > Options > Modeling from the main menu. The dialog includes Fact Editor and ORM Diagram panes for setting ORM preferences. The other two panes deal with preferences for the logical modeling solution, and are covered in a later chapter.
Figure 6-1 shows the Fact Editor pane of the dialog with the category set to Input preferences. Use this to choose Guided or Freeform entry, decide whether to combine "at most one" and "some" as "exactly one" in constraints, and use capitals or brackets to distinguish object types. These options were explained in sections 4.2 and 4.3.
Figure 6-1: Configuring input preferences for the Fact Editor.
Use the Category list-box in the Fact Editor pane to select the Miscellaneous preferences and Syntax Colors options displayed in Figure 6-2. These options should be selfexplanatory. For further details on any of these options, select the option, then press the F1 key to display the context-sensitive help.
Figure 6-2: Configuring other Fact Editor preferences.
Select the ORM Diagram tab of the Database Modeling Preferences dialog to display the ORM Diagram pane shown in Figure 6-3. By default, the option for When removing an object from a diagram is set to "Ask user what to do." This ensures that if you press the Delete key when one or more model elements are selected, you are prompted whether to delete them from the diagram only or from the model as well. This prompt can save you from an accidental deletion, so don't change this default setting unless you have good reason to do so.
Figure 6-3: Configuring ORM diagram preferences.
The Object type name field allows you to control the base
In an ORM schema, object types may be connected by predicates and/or subtype relationships. Graphically, a predicate is depicted as a named sequence of one or more role boxes, and a subtype relationship is depicted as an arrow from subtype to
Although you can use the Business Rules window to drag all of an object type's fact types onto the drawing window, this can be
The best way to understand this operation is to watch it in action. Let's see how it works using the Patient CS model.
Figure 6-4: Right-click an object type to access its context menu.
This results in the display shown in Figure 6-5. In the global schema, FemalePatient participates in the two fact types shown and in a subtype relationship to Patient.
Figure 6-5: The display after applying Show Relationships to FemalePatient.
Now right-click the PapSmear object type, and choose Show Relationships from its context menu. This adds to the display all the other connections for PapSmear. This results in two more fact types being displayed, as shown in Figure 6-6.
Figure 6-6: The display on applying Show Relationships to PapSmear in Figure 6-5.
Using the Show Relationships feature, you can progressively open up a model, expanding the neighborhood displayed for any object type you choose. This is very useful for model browsing, and for deciding what the impact would be of removing an object type from the model. As we'll see in a later chapter, it is also extremely useful for displaying an ORM model that has been reverse-engineered from an existing database.