Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Insert excerpt
_Banners
_Banners
nameERD
nopaneltrue

Relationships Between Tables 

Tables in PhixFlow are relational, which means that information in one table can be related to information in another table. Data can then be accessed in many different views without requiring duplication. A line connects the Primary Key or Secondary Key of one table to a Foreign Key in a different table and represents a RelationshipThe relationships supported in PhixFlow are:

Table of Contents
maxLevel2
minLevel2

One-to-Many and Many-to-One Relationships

The relationship line between a Primary Key or Secondary Key and Foreign Key represents a one-to-many relationship. In the below example, one teacher runs many courses.

A many-to-one relationship is implied when you read a relationship in the opposite direction. In the below example, many courses are run by one teacher. 

Many-to-Many Relationships

Many-to-many relationship can be supported with an intermediate table.

many-to-many relationship is created when there is an intermediate table with a Foreign Key from each of the related tables. In the example used below, many students take many courses, and so a many-to-many relationship is created using the intermediate table, Schools_Course_Attendees.

Multi-Hop Relationships

Multi-hop relationships are relationships between tables without a direct relationship. PhixFlow supports multi-hop relationships to a distance of 4 hops. In the example ERD below, the relationship distance between the Buildings and Bookings table is 2 hops, and between the Buildings and Departments table is 4 hops. 

Creating Multi-Hop Views and SubViews

When a View is created on a table,

Insert excerpt
_subview
_subview
nopaneltrue
s are created automatically.

Expand
titleHow do I create a View?
  • On your ERD, click on your table to open the Properties
  • In the Views section, click the 
    Insert excerpt
    _add_icon
    _add_icon
    nopaneltrue
    icon
  • Give your view a name and click
    Insert excerpt
    _save
    _save
    nopaneltrue
  • In the View Attributes section, click the
    Insert excerpt
    _attributes_icon
    _attributes_icon
    nopaneltrue
    icon
  • In the Available Attributes window, drag across the required attributes into the View Attributes section of the View
    • Click on the Related Tables and repeat this for all required attributes

SubViews can be seen in Attribute Source section on the View

Image Removed

SubViews

and represent one table linked to another

As

. If more attributes are added to the main View

, if

and there's already

a SubView they can be added into

an appropriate SubView, they will be added automatically to the SubView, otherwise another SubView will be created.

Attributes can also be added from the Available Attributes window directly onto the Attribute Source section.

Image Added

Modifying SubViews

  • Access the
    Insert excerpt
    _subview
    _subview
    nopaneltrue
    properties from the View properties Attribute Source section → double-click on a SubView name
  • SubViews can be copied by right-clicking on the SubView in the Attribute Source section and choosing 
    Insert excerpt
    _duplicate_subview
    _duplicate_subview
    nopaneltrue
    • Duplicating a SubView does not copy the attributes, just the source and target tables are copied
    A

If required, a Default Filter can be applied to the SubView and will apply to all attributes on the SubView

If required, filters specific to an individual attribute can be applied

Image Added

Filters for specific attributes can also be applied but the attribute must be aggregate. This is set by double-clicking the attribute

name Aggregation can also be added to attributes this way 

name in the View Attributes section of the View to choose an Aggregate Function, then apply a Filter.

Further Reading

.

Further Reading