The Entity Relationship Diagrammer

The Entity Relationship Diagrammer


The Entity Relationship Diagrammer is a powerful tool that includes several abilities. In its basic form, it can be used to create a data model. In addition, it can also specify attributes for an existing set of entities. Lastly, it can serve as the launchpad for automated database design. The Entity Relationship Diagrammer icon Button can be accessed from the Planning or Analysis workstations.


Creating a data model

A data model in Information Engineering is simply a graphical depiction of the entities of interest, their interrelationships, and the cardinalities associated with the relationships. Optionally, the attributes associated with the entities may be included on the diagram.

At the start, you will be queried as to the scope of the data model. You can create a data model for a separate process, function, or other part of the IS. This option is useful in the context of very large IS, wherein it becomes necessary to look at parts of the data model to manage the complexity. In the case of the projects that you will be working on, the scope is fairly restricted, and thus you can work on the data model for the entire IS at once. Therefore, you need to select The Entity Model radio button, and then click on Display. This brings up a data model for the entire IS, integrating any separate data models if they exist.

To create a data model, you need to add entities to the window. This is done through the Add option at the main menu, as depicted below.

Add Option Screen

As with any ADW Add menu, you can add several entities at a time. In case you wish to include entities already entered previously, you should use the Find option. However, in most cases you will be using the Create option.

This will put several entities (in red) on the screen in a fairly random layout. You can rearrange these objects by selecting them (left mouse click - they will appear highlighted in yellow), and then dragging then (keeping the right mouse button pressed) to the point where you wish them located (and then releasing the right mouse button). Note that this works differently than in Windows.

You can also expand the size of the diagram by moving an entity off the screen (either down or left). ADW will then redraw the diagram with a larger Overview window.


Adding relationships

Relationships can be added in two ways. The more tedious way is to highlight the two entities you wish to connect, then add a Relationship Type from the Add menu. A faster and more logical way is to highlight one entity, and then keeping the left mouse button depressed, draw a line to the target entity, as depicted below, where a relationship is being created between the entities INSTRUCTOR and COURSE-SECTION.

Adding Relationships

You are then presented with a screen that describes the relation, including two-way labels, and respective cardinalities.

Relationship Definition

In this case, it is assumed that the relationship of interest is labelled teaches and is taught by. The cardinalities are also straightforward, assuming that an instructor can teach none or many course sections, while each section is taught by one and only one instructor.


Adding attributes

Attributes can be added to each entity through the Entity Type Description option under the Describe portion of the main menu.

Add Attribute Menu

This gives you a different window that describes the entity in greater detail, specifying all native and inherited attributes, as well as native and inherited relationships.

Entity Description Screen

Attributes are added through the Add menu. Key attributes need to be added slightly differently from regular attributes.

Add Key Screen

For all attributes, you need to specify a minimum and maximum representing the number of occurrences in each tuple. Since we are working with a relational model, no repeating groups are allowed, and hence these values are set to 1 each. In the case of a key attribute, the Max per value field needs to be set to 1, representing the maximum possible instance values of this attribute.

In this case, the COURSE-NO is designated as the key. Other attributes can be added, with a blank value for the Max per value field. The result of adding the relevant attributes is depicted below.

Attributes Added Screen

Note that the COURSE-NO attribute has a designated < Id > notation.

When you are done with adding attributes, you shut down the window by double clinking the folder icon. This will return you to the original entity-relationship diagram


Final touches

Upon adding all entities, relationships, and attributes, the data model is complete, as depicted below

Final Model

It is also possible to depict the associated attributes (and also print them) on the diagram itself. To accomplish this, click on the four paned window in the bottom left of an entity, and all defined attributes will be displayed, with keys identified.

Model with Attributes

At this stage, the diagram can be easily printed.


CASE Tools Software Tools

CASE Tools | Software Tools


© Derek Nazareth, last updated on January 1, 1996.