Create a New ERD
- From the home menu, select Data → ERD.
- From the ERD list, select Create New.
- PhixFlow opens the properties for the ERD on the right. Enter the name for your ERD and click
.Insert excerpt _finish _finish nopanel true - PhixFlow opens a new ERD canvas on the left. The ERD has a toolbar at the top. Hover over toolbar icons to display a tooltip for them.
Tip | ||||||||
---|---|---|---|---|---|---|---|---|
When you make any changes to the ERD, remember to
|
Open an Existing ERD
To open an existing ERD you can:
- From the home menu, select Data → ERD and click on an ERD in the list.
- In the repository, open your application and find Data → ERD.
- either right-click on an ERD name and select Display.
- or click the ERD name to open the properties. In the properties toolbar, click the
icon.Insert excerpt _erd _erd nopanel true
Create a New Table
- From the canvas toolbar, drag the
icon from the toolbar into the diagram.Insert excerpt _streams_add _streams_add nopanel true - In the pop-up, enter its name, for example "Customer" and click
.Insert excerpt _dialog_finish _dialog_finish nopanel true - PhixFlow adds a box to represent the table, and opens the properties tab for it. The table is created with one attribute called UID, which is set as the primary key.
- Optionally, rename the primary key.
- Click on the UID line in the table. PhixFlow opens the attribute properties.
- In the Name field, change the name. We recommend that UID or ID is part of the name to indicate this attribute is the unique identifier.
the attribute properties.Insert excerpt _dialog_finish _dialog_finish nopanel true
- To add attributes to the table:
- In the table, click
. PhixFlow opens the attribute properties.Insert excerpt _add _add nopanel true - Enter the Name, Type and Length for the data; see Stream Attributes. Attributes are created with the default of a 50 character string. It's important to change this for other types of data, for example, numerical or date/time data.
the attribute properties.Insert excerpt _dialog_finish _dialog_finish nopanel true
- In the table, click
- PhixFlow adds the attribute to the table in the ERD.
Add an Existing Table
- From the canvas toolbar, Click the Stream List icon.
- PhixFlow filters the repository to show the list of tables available in this application.
- Drag a table from the repository into the ERD canvas.
Creating Relationships Between Attributes
The purpose of a relationship is to show that an attribute in one table contains the same data as the same as a primary key in another table. You are aiming to:
- relate a primary key with a non-primary attribute
- ensure related attributes have the same data properties.
To create a relationship between attributes in different tables, click-drag from one attribute to another.
- Click on the source attribute.
- Drag to the destination attribute. PhixFlow highlights the attribute when your mouse pointer is over it. This may be offset from the end of the relationship arrow.
- When the destination attribute is highlighted release the click.
- Enter the name for the relationship.
- PhixFlow
- adds the relationship arrow
- opens its properties; see Relationships
- sets the destination attribute to be a foreign key.
If you try to create a relationship between two non-primary attributes, PhixFlow assumes the source attribute is the primary key.
- If the source table does not have a primary key, it sets the source attribute to be primary.
- If the source table already has a primary key, it uses it as the source attribute.
Properties
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Basic Settings
Field | Description |
---|---|
Name | Enter the name for the ERD. When you press Return or Save a new properties tab, PhixFlow opens an empty diagram in the workspace on the left. |