Create an Entity Relationship Diagram

(Peter Chen Notation)

Choose a symbol from the Palette and drag it onto the canvas.

You can move objects about, change object attributes, and connect objects (create lines).

Your work can be saved/loaded.

Moving objects about

You must move the cursor over the object until it is the arrow above.

Then, click/hold and drag

Displaying options for an object

You must move the cursor over the object until it is the pointing hand above.

Then, right-click and choose. Examples:

For a regular entity type, you can choose for it to become weak

For a relationship type, you can choose for it to become identifying

For attributes, there are several choices. E.g. a descriptive attribute can be converted to be a key, partial key, derived, or multivalued.

Constructing a link: connecting objects / creating lines in an Entity Relationship Diagram

You must move the cursor over one of the objects until it is the pointing hand above.

Then, click, hold down the button, and drag to the other object

Displaying options for a relationship line

Click the line and choose.

A relationship line represents optional participation as a single line, |, or mandatory participation as a double-line, ‖

Deleting an object/ undo / redo

Click on an object and press delete.

Actions can be undone (Ctrl-z) and redone (Ctrl-y).

Ojbects can be copied (Ctrl-c) and pasted (Ctrl-v) but a pasted object sits directly on top of the original.

Placing an object on the canvas

Entity, Weak Entity, Subtype Connector, Relationship, Identifying Relationship, Attributes

Drag the symbol from the palette on the left side to the canvas on the right

Double-click the text and type the content you need

Creating a relationship

To create a relationship between you must first of all have the objects on the canvas.

Given that Person, works for, and Company, are on the canvas, there are 6 minor steps to follow

  1. With the cursor (as a pointing hand) over Person, drag to the relationship. You will see the relationship highlighted when you can release the cursor. Upon releasing the cursor, the line is drawn from Person to works for.
  2. The role name is set by clicking the text and editing or removed by pressing delete.
  3. The cardinality can be set by clicking the text and editing it. Values of 1, N, M, P or Q are accepted.
  4. With the cursor (as a pointing hand) over Company, drag to the relationship. You will see the relationship highlighted when you can release the cursor. Upon releasing the cursor, the line is drawn from Company to works for.
  5. The role name is set by clicking the text and editing, or removed by pressing delete.
  6. The cardinality can be set by clicking the text and editing it. Values of 1, N, M, P or Q are accepted.

ISA Relationships: Supertypes and subtypes

Independent Subtypes

When we want a subtype that is independent of other subtyping we don't need the subtype connector

We need the supertype and substypes on the canvas:

  1. With the cursor (as a pointing hand) over the subtype entity, drag to the supertype entity.
  2. Repeat the above for each subtype entity.

Related Subtypes

When we want a supertype and several subtypes that are related in some way (perhaps the subtype is determined according to the value of a supertype's attribute.

We need the supertype, substypes, and the subtyping connector on the canvas, and then:

  1. With the cursor (as a pointing hand) over the subtype connector, drag to the supertype entity.
  2. The discriminator attribute can be named by clicking the text and editing, or removed by pressing delete.
  3. With the cursor (as a pointing hand) over the subtype entity, drag to the subtype connector. Repeat for each related subtype.

Attributes

Partial key, Key, Normal, Multivalued, Derived

An attribute can be connected to one other object: another attribute (in case of composite attributes), a relationship type, or an entity type

When constructing the link you drag from an attribute to its parent attribute, or from an attribute to its associated entity type or relationship type

Saving your work

At the bottom of the page there is a 3-step process to save your diagram to a file.

Loading a previously saved diagram

At the bottom of the page there is a 2-step process to load a diagram from a file.