Drawing ERDs
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
either, in the repository,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
- or right-click the table and select Add New Stream Attribute.
- PhixFlow opens a Stream Attributes properties tab where you can specify details for the attribute, such as its name, data type and length.
- PhixFlow creates a newIf this is the unique identifier, tick Primary Key. Remember to include ID or UID in the name.
Attributes properties
Name
Location: Where the attribute's data is sourced
Current Table: from the records in this table
Relation: from the records in the unique attribute in another table.
Fixed list: from a defined list (??)
Related table
Where the attribute and its relationships have been defined in an ERD, this is set automatically.
To create a relationship, select the table.
Order, Description
Add an Existing Stream
- In the repository, open the list of tables/streams.
- Drag a table/stream from the repository into the diagram. PhixFlow adds the stream with a list of all of its attributes.
- If the stream has many attributes, click to collapse the stream so that it only shows the primary and foreign keys.
Connect Attributes
To connect attributes in different tables/streams- 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
- 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. PhixFlow shows the currently selected destination in bold. Release the click to connect to the selected destination.
PhixFlow can only connect primary and foreign keys. This creates a one to many relationship. If you connect standard attributes, PhixFlow automatically sets them to be foreign keys.
.
- 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 Relations
- 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. |