Using ERWin to create Relationships

To begin, you need to start up ERWin and then open the model that we created previously.

Open the Model

On the ERwin File menu, choose Open.
Locate the AG1.er1 file on your floppy disk or your H drive and then click OK.
TIP: Check to make sure that you are using the I.E. notation.
Printing
Select the File menu and the Print menu item.  Be sure that you are printing to the correct printer.
Select relationship tool
 
In the ERwin toolbox, click the Non Identifying Relationship tool .
The cursor changes shape to identify the tool you selected.
Course Example 9
Draw the relationship line between the two entities
Click the CUSTOMER entity (parent).
Click the INVOICE entity (child).
Because this is an non identifying relationship, ERwin draws a dashed line.

Click the PRODUCT entity (parent).
Click the INVOICE entity (child).
Because this is an non identifying relationship, ERwin draws a dashed line.

Display the Relationship Editor
Click the Select tool in the ERwin Toolbox.
Right click the relationship line between the INVOICE and the CUSTOMER and ERwin displays the relationship shortcut menu.
On the shortcut menu, choose Relationship Editor.
Add verb phrases
In the General Tab, replace the default text with text that describes the relationship of a CUSTOMER (the parent) to an INVOICE (the child) in the Parent-to-Child Phrase box i.e. specifies
Next, fill in the Child-to-Parent Phrase box i.e. for
Click OK.
ERwin closes the Relationship Editor and adds the verb phrase to the relationship line.

If you do not see the verb phrase you need to turn on the verb phrase display option.
To set this option: Right click on a blank part of the diagram, then choose Display Options/Relationships then Verb Phrases from the short-cut menu.

Repeat this process for the relationship between INVOICE and PRODUCT.

Course Example 10

Migrating Foreign Keys
Right button click in an empty area.
Select Display Options / Entities.
When the submenu appears, at the very bottom select Show Migrated Attributes.
 
Course Example 11

What has happened to the INVOICE entity?  Why?

Save your changes by the new name AG2.er1