< Previous | Next >

Creating a new diagram and adding related objects

In this exercise, you create a new blank diagram and add related objects to the diagram. The workbench discovers related objects for you so that you can build a diagram that only includes a subset of the model objects that you are interested in.
To create a new diagram:
  1. Double-click the Invoice.ldm file in the Data Project Explorer. The model opens in the logical data model editor.
  2. In the Data Project Explorer, expand the Invoice subpackage, right-click the Diagrams folder, and select New Blank Diagram. A new blank diagram is created with a default name, Diagram1, and is displayed in the Data Project Explorer under the Diagrams folder.
  3. Select the new diagram in the Data Project Explorer, and open the Properties view.
  4. In the Properties view, type myinvoiceDiagram in the Diagram name field.
  5. Click in a blank area of the diagram.

    On the Filter page in the Properties view, you can modify the amount of information that is displayed for each object or connector in a diagram. Select the check box next to an option to display that option in the diagram. If you were working with a large diagram, you could use these filter options to simplify the diagram display. Filtering out display objects can also improve diagram performance. In this case you are working with a small diagram so you can keep the default display options.

    Next you add an entity to the myinvoiceDiagram diagram. Under the Invoice package in the Data Project Explorer, you can see several entities.

  6. Drag the Invoice entity from the Data Project Explorer to the diagram.
    Next you use the Show Related Elements action to add objects that are related to the Invoice entity to the diagram. This action adds related entities in either direction to the diagram through the following relationships:
    • Dependency
    • Foreign key
    • Generalization

    You can browse the Relationships page in the Properties view first to see which objects will be added. All related entities except those that are related through a generalization are shown in the Properties view.

  7. Select the Invoice entity in either the diagram or the Data Project Explorer.
  8. Click the Relationships tab in the Properties view. The following entities that have relationships to the Invoice entity are displayed:
    • Invoice Item
    • Invoice Status
    • Invoice Term
  9. Right-click the Invoice entity in the diagram and select Show Related Elements. The entities that have relationships to the Invoice entity are added to the diagram.
  10. Right-click in a blank area of the diagram, and select Arrange All.

    All of the objects are arranged on the diagram surface so that you can see all shapes and connectors without overlap. You can also select specific objects and use the other diagram arrangement actions to arrange them in the diagram.

    Next you use the Show Related Elements action to add more entities to the diagram.

  11. Right-click the Invoice Item entity and select Show Related Elements.
    Tip: You can find this entity more easily by pressing Ctrl+F and typing Invoice Item in the Diagram Find window.
    The following related entities are added to the diagram:
    • Invoice Adjustment
    • Product Invoice Item
  12. Use the Arrange All option again to arrange the new entities on the diagram surface.
  13. Save the Invoice.ldm file.
< Previous | Next >

Feedback