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:
- Double-click the Invoice.ldm file in the Data Project Explorer. The model opens in the logical data model editor.
- 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.
- Select the new diagram in the Data Project Explorer, and open the
Properties view.
- In the Properties view, type myinvoiceDiagram in
the Diagram name field.
- 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.
- 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.
- Select the Invoice entity in either the diagram or the Data Project
Explorer.
- 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
- 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.
- 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.
- 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
- Use the Arrange All option again to arrange
the new entities on the diagram surface.
- Save the Invoice.ldm file.