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 5 Next »

This page is for....TODO

Overview

Use an entity relationship diagram are commonly used to draw out the relationships between data elements in a database. It helps you to visualise how the systems information is connected.

The components of a diagram

  • Each "entity" is displayed as a box,  This is equivalent to a stream in PhixFlow
  • Entities have attributes
  • Entities usually have one attribute that is a unique Primary key.
    Foreign keys are linked to the primary key in another entity
  • Relationships show how entities are connected
  • Attributes
  • between streams - entities ??
  • between attributes. 

Relationships can be 1-to-1, 1-to-many or many-to-many. TODO - self-connected?

Creates

Contains

Has

To show the process flow of data, use a BPMN diagram

TODO purpose.

Other affected pages: repository, toolbars

Properties

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 entity-relationship diagram. When yo press Return or save a new properties tab, PhixFlow opens an empty diagram in the workspace on the left.


Drawing Entity-Relationship Diagrams

To create an ERD, in the application repository, right-click ERD and select  Add New. PhixFlow opens the properties for diagram, where you can add the name and a description for it. When you press Return or save a new properties tab, PhixFlow opens an empty diagram in the workspace on the left.

Adding Entities

To open an existing ERD:

  • either, in the Repository, right-click the name and select Display.
  • or, in the properties toolbar, click the ERD icon (TODO add).


Entities are represented by streams and their attributes.

To add an existing stream, from the repository, drag an existing stream into the diagram. PhixFlow adds the stream and all of its attributes.

To add a new stream.

  1. from the toolbar, drag the stream icon (TODO add) into the diagram.
  2. Enter a name for the new stream and click . PhixFlow opens a new Stream properties tab.
  3. To add attributes to an entity/stream:
    either, in the stream properties → Attributes section toolbar, click  Add New
    or, right-click the stream and select Add New Stream Attribute.
  4. In the new attribute properties, enter details for the Stream Attributes.

As streams can contain many attributes, you can collapse the view to show only primary and foreign keys. TODO ADD screenshot

Adding Relationships

To add a relationship, click on one attribute and drag the mouse pointer to an attribute in another stream. PhixFlow extends a red arrow line. Stop dragging, or click on an attribute name to connect the two. PhixFlow displays an attribute in bold when it has focus.

When you create a relationship, PhixFlow:

  • sets the origin attribute to be a Primary Key which must be unique.
  • sets the destination attribute to be a Foreign Key
  • creates a one-to-many relationship

The Primary Key and Foreign Key are properties of the Stream Attributes. (TODO ADD the new properties to attributes)

If both attributes are

primary keys, PhixFlow creates a one-to-one relationship.

foreigh keys, PhixFlow creates a many-to-many relationship.

If you connect two primary keys, PhixFlow creates a 1 to 1 relationship.

You cannot create a relationship between attributes if they are not a primary or foreign key. If you add a relationship between attributes, PhixFlow automatically sets them to be one of these.


ERDs and Relational Views

TODO - Add how ERDs and Relational vies interact.


TODO - Possibly bugs or possibly me...

  • I ended up with 3 streams that did not appear until the diagram is saved
  • I tried to link 2 non-key attributes. The from point kept going to the primary key attribute. I had to drag the correct attribute from the stream attributes into the relationship.
  • relationship end points can be drawn a long way from the mouse. 
  • I can untick keys and it keeps the relationship


Toolbar

TODO Same as Model Window Toolbar Icons

Organise selected objects in a grid.

Align all selected objects left.

Align all selected objects right.

Align all selected objects to top.

Align all selected objects to bottom.

Distribute all selected objects horizontally. Changed ICON TODO

Distribute all selected objects vertically. Changed ICON TODO


Drag into the diagram to add a stream, or click to open the list of streams in the repository

Save TODO

Refresh TODO

Help TODO



  • No labels