Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 22 Next »

This page is for data modellers or application designers. It explains how to draw an ERD and its properties.

This page is for any user creating an application that will be backed by data. It explains how to draw an ERD and setup its properties.

Gary Parden comments in red

Anthony George comments in blue

Overview

Use an ERD to represent the information data that your application will use and how it is connected.

As you draw the diagram, PhixFlow creates table, attribute and relationship items. You can find:

  • tables in the repository Data → Tables category.
  • attributes listed in the table's properties.

PhixFlow sets the properties for a relationship item automatically. What Properties? If you want to check them, in the ERD, click the relationship arrow to open its properties. This will only show the name

PhixFlow automatically saves any changes you make to the ERD. This is no longer true, the save will work the same way as an Analysis model.

For ERD concepts, see Understanding ERDs.

Sections on this page

Create a New ERD

  1. From the home menu, select Data → ERD.
  2. From the ERD list, Select Create New from the left hand side.
  3. PhixFlow opens the properties for the ERD on the right. Enter the name for your ERD and click  OK. In the popup window enter the name for your ERD, a useful description and click confirm.
  4. 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 that explains their use.

When you make any changes to the ERD, remember to  Save it.

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 double click the ERD name to open the properties. In the properties toolbar, click the  ERD icon.

Create a New Table

  1. From the canvas toolbar, drag the 
    Error rendering macro 'excerpt-include' : No link could be created for '_streams_add'.
     icon from the toolbar into the diagram.
  2. In the pop-up, enter its name, for example "Customer" and click .
  3. PhixFlow adds a box to represent the table to the ERD, and opens the properties tab for it. The table is created with one two attributes: UID and Name. The UID is set as the primary key and the Name is set as the display attribute for the table. We might want to make reference to how this is used?
  4. Optionally, rename the primary key. 
    1. Click on the UID line in the table. PhixFlow opens the attribute properties.
    2. 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. NB: ID is a reserved word and cannot be used on its own.
    3.  the attribute properties.
  5. To add attributes to the table:
    1. In the table, click  Add New. PhixFlow opens the attribute properties.
    2. 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. We make no reference to the current table  relation button?
    3.  the attribute properties.
  6. PhixFlow adds the attribute to the table in the ERD.

Add an Existing Table

  1. From the canvas toolbar, Click the Stream List icon. Tables icon. Should this be an icon?
  2. PhixFlow filters the repository to show the list of tables available in this application.
  3. Drag a table from the repository into onto 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. I dont understand this? My understanding is that it allows us to display data from a different table without having to duplicate the data in multiple places? You are aiming to: Not sure how this helps?

  • relate a primary key with a non-primary attribute. do we want to make refence to a foreign key? 
  • ensure related attributes have the same data properties.

To create a relationship between attributes in different tables, click-drag from one attribute to another. 

  1. Click on the source attribute.
  2. 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. Not sure what the last sentence means? Sounds like a bug?This is a bug
  3. When the destination attribute is highlighted release the click.
  4. Enter the name for the relationship. I believe the name is provided automatically, but the user can change it. Please refer to the Adobe XD file. I understood that we were going to hide or drop the relationship names as they were redundant
  5. PhixFlow
    • adds the relationship arrow
    • opens its properties; see Relationships It does not
    • sets the destination attribute to be a foreign key. Only if you have dragged a primary key, but we can drag a non-primary key onto a primary key. I think this is a bug - it should only be possible to connect primary to foreign key, and I'm not happy with converting non-key to foreign-key because it currently ignores type mismatches.

If you try to create a relationship between two non-primary attributes, PhixFlow assumes the source attribute is the primary key. We don't support this as it's considered a many-to-many.

  • If the source table does not have a primary key, it sets the source attribute to be primary. All tables have a primary key. This isn't true if you've defined a stream elsewhere, but I'm inclined to think that you shouldn't be allowed to add relationships util you have added/nominated a primary key.
  • If the source table already has a primary key, it uses it as the source attribute. I don't understand this. Not sure its relevant due to the comment above.

Do we need to explain the many-to-one and the one-to-many and that m:n is not supported at this time?

Properties

I cant add a direct comment but he section below relates to the properties toolbar? Should it say tab? it links later to the tabs section.

For information about the properties toolbar, and about the sections Parent Details, Analysis Models, Description and Audit Summary, see Common Properties.  We recommend you always add a Description that explains the purpose of the item you are creating. 

For a full list of all the PhixFlow property tabs and windows, see Properties, Windows, Menus and Toolbars.

Basic Settings

FieldDescription
NameEnter the name for the ERD. When you press Return or click Save a new properties tab, is there a word missing here? PhixFlow opens an empty diagram in the workspace on the left.

ERD Context Menu and Toolbar

In an ERD, you can hover your mouse pointer over the toolbar or context menu options to see what they are for.

We have a more menu and make no reference to it? I am note sure we have a right click menu.

Toolbar

You can find the toolbar at the top of the canvas

OptionDescription
ERD Options Create
Table CreateDrag this icon onto the canvas to create a table.
ScreenCreates a new screen for the selected table.
List
TablesClick to see a list available tables.
ScreensClick to see a list available screens.
 Canvas
SaveSave changes to the diagram. If there is no save icon, PhixFlow is saving changes automatically.
Refresh

Redraw the current diagram. If there have been recent changes to the diagram properties, these will be shown. 

Refresh the ERD to display recent changes to the diagram.

HelpSlide open the help panel on the right. there is no help button
PropertiesOpen the properties for the current diagram.

Zoom out

Zoom out to see more of the diagram, with smaller text.

Zoom in

Zoom in to see a smaller area of the diagram, with larger text.

Ungroup

Select a grouped set of items and then click to ungroup them.

Select several items then click to group them together.

Group

Select several items then click to group them together.

Back

For screen layout, move a component back.

ForwardFor screen layout, bring a component forward.

Align options

Click/hover to show Shows all options for aligning items on the canvas.

Align Grid

Organise selected items into a grid pattern.

Align left

Align selected items to the left.

Align right

Align selected items to the right.

Align top

Align selected objects to the  top.

Align bottom

Align selected objects to the bottom.

Distribute horizontally

For at least 3 items, adjust so they have equal space between them, left to right. Distributes the selected items evenly between the left and right outer most items. Works for 3 items or more.

Distribute vertically

For at least 3 items, adjust so they have equal space between them, from top to bottom. Distributes the selected items evenly between the top and bottom outer most items. Works for 3 items or more.

Context Menu

In the ERD, right-click a table to show the context menu.

OptionDescription

Configure Table

Open the properties for this table.

Remove from Diagram

Remove the selected item(s) from the diagram.

Show all tables using this table

Lists the tables with a relationship into this one (many-to-one).

Show all tables related tables

Show all tables used by this table

This table has one-to-many relationships with other tables.

List the tables this one relates out to (one-to-many).  

Delete everywhere

Delete the selected item(s) from the ERD repository and from everywhere it is used.
  • No labels