Versions Compared

Key

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

Overview

PhixFlow Entity Entity Relationship Diagrams (ERDs) define the logical structure of the data in your application. "Entities" are displayed as tables and represent the "things" in the world that you want to represent as data.

The ERD Window

show as data.

Opening and Creating ERDs

  • On your application's home page, click
    Insert excerpt
    _erd
    _erd
    nopaneltrue
     to list the existing ERDs.
    • Alternatively, click
      Insert excerpt
      _erd
      _erd
      nopaneltrue
       from the header bar. 
  • To create a new ERD, click the 
    Insert excerpt
    _add
    _add
    nopaneltrue
    button.
  • To open an existing ERD, double-click it.

ERD Layout

Here is a simplified view of the ERD window:

Image Removed

  • The toolbar provides ERD specific options, such as displaying the available data tables that you can add to your ERD and creating a new screen for your data. 
  • Image Added

    1. Toolbar: This contains ERD-specific options to add data to the ERD and move tables on the canvas.
    2. Repository: On the toolbar, click
      Insert excerpt
      _tables
      _tables
      nopaneltrue
       to list all available tables in the r R
      epositorypane on  on the right
      The main part of the window is the canvas, where you create the ERD.To add a new table, from the toolbar, drag the . These can be dragged and dropped onto the canvas.
    3. Canvas: This is where you create and modify your ERD.
    4. Table: This is represented as a box, containing a list of all of the attributes within the data and their associated data type (e.g. string). 
    5. Relationship: This is represented as a line connecting the tables.
    6. Options: View the data in the table by clicking 
      Insert excerpt
      _view_show_
      tables
      icononly
      _view_
      tables
      show_icononly
      nopaneltrue
       icon onto the canvas.To add an existing table, on the toolbar, click  or show all table options by clicking 
      Insert excerpt
      _more_
      tables_tables
      options_erd
      _more_options_erd
      nopaneltrue
      .

    Tables

    A table is where your data is stored for your application.

    Image Added

    Attributes

    Attributes represent the different pieces of data recorded in the table, and can be thought of as column headers on a spreadsheet.

    • Attributes are configured with a data type (e.g. string) and properties. To change these, click on the attribute's name. See Understanding Data Types.

    Primary Keys

    Primary Keys are special attributes which uniquely identify each record.

    PhixFlow lists the available tables in the repository. Drag a table from the repository onto the canvas. 
  • To add an Excel or CSV spreadsheet, drag it directly onto the canvas. PhixFlow imports the data and uses it to create a new table.
  • Image Removed

    Table Relationships

    1. A table is represented as a box, containing a list of all of the attributes it contains and their associated data type.
    2. A line connecting tables represents the relationship between them. The line connects the primary key of one table to a foreign key in a different table; see Relationship.

    Image Removed

    ERD Example

    The following example shows an ERD for a school. Here the school has entities: departments, teachers, students, classrooms and so on. All these entities are represented as tables and the lines connecting them show their relationships to one another. We can see from this diagram that a School Department has many Classrooms and Teachers. This example is covered in detail in Understanding ERDs.

    Image Removed

    Creating an ERD and Opening an Existing ERD

    On your application's home page, click Insert excerpt_erd_erdnopaneltrue to list the existing ERDs.Alternatively, click Insert excerpt_erd_erdnopaneltrue from the header bar. On the Entity Relationship Diagrams page:Click the  Insert excerpt_add_addnopaneltrue button to create a new ERD.
  • Alternatively, double-click any existing ERD to open it.
  • Already Have Data?

    If you have data to import into PhixFlow, such as a database or API, use an Analysis Model to import it. This allows you to configure connectors to access your existing data and store the data as tables in PhixFlow's own database. See Importing Data and Importing Data Through an API.

    You can also use an Analysis Model to set up bulk processes to manipulate large volumes of data before it is presented to your users. See Analysis Models for Batch Processing Data.

    What's Next?

    Understanding ERDs covers ERDs in more depth to help you design your own ERDs and views to display your data. 

    • When you create a new table, PhixFlow adds an attribute called UID and configures it as follows:

      • the table's Primary Key
      • an integer
      • automatically creates a unique number for every record in the table
    • If your data already has a unique attribute, you can use this as the Primary Key by right-clicking and selecting Make Primary Key
      • On the example image above, the Teacher table has the attribute UID (Unique IDentifier) as the Primary Key. This is because teachers may have the same first and/or surname, so these attributes cannot be guaranteed to be unique and therefore cannot be a Primary Key.

    Display Names

    Display Names are special attributes which are displayed instead of a Primary Key, as they make more sense to a human.

    • When you create a new table, PhixFlow adds an attribute called Name and configures it as the Display Name.
      • This is then shown in place of the Primary Key when displayed on a screen. Display Names do not need to be unique and should be user-friendly.
    • If your data already has an attribute you want to use as the Display Name, right-click it and select Make Display Name

    Foreign Keys

    Foreign Keys are attributes in one table that relate to the Primary Key in another table.

    • Foreign Keys must have the same data type and properties as the corresponding Primary Key. For example, both must be strings of the same length.
    Info

    When a relationship is created by dragging a Primary Key from one table onto the attribute of another table, PhixFlow sets this attribute to be a Foreign Key.

    Image Added

    Validation

    Validation is applied to table attributes and determines the criteria an attribute must satisfy in order to be considered valid. For example, the attribute is mandatory, must contain a minimum number of characters or must adhere to a specific pattern. Validation added to a table will be applied wherever the attribute is updated, such as when saving data on an input screen. See Table Attribute Validation.

    Indexing

    Indexes are applied to attributes on a table and help improve the speed of data retrieval. They work like the index of a book. Users do not see the indexes, they are used internally by PhixFlow. Updating a table with indexes takes more time than one without, as the indexes also need to be updated. Therefore, indexes should only be created on attributes that will be frequently searched against. See Indexed on Attribute.

    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 tables without requiring duplication.

    A line connects the Primary Key of one table to a Foreign Key in a different table, and represents the relationship. See Relationship.

    Image Added

    One-to-many and Many-to-one

    The relationship line between a Primary 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, a department has many teachers, and several teachers work for one department.

    Image Added

    Many:many 

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

    Expand
    titleClick here to see more

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

    Notice that CourseAttendee does not need a unique identifier.

    Image Added

    Working in an ERD

    You can add tables in an ERD manually. See Adding Content to an ERD.

    • Create a new table by dragging 
      Insert excerpt
      _tables
      _tables
      nopaneltrue
       from the toolbar onto the canvas.
    • Add an Excel spreadsheet by dragging it onto the canvas. PhixFlow imports the data and creates a new table.
    • Add an existing table by clicking 
      Insert excerpt
      _tables
      _tables
      nopaneltrue
       in the toolbar. The available tables are listed in the Repository and can be dragged 
      onto the canvas.
       See 2. Importing Data.

    View Table Data

    Select 

    Insert excerpt
    _view_show_icononly
    _view_show_icononly
    nopaneltrue
     from the table header. Different views can be created, see Creating Dashboards and Reports.

    Image Added

    Create a Screen from a Table

    Select 

    Insert excerpt
    _more_options_erd_IconOnly
    _more_options_erd_IconOnly
    nopaneltrue
     from the table options and click Create Screen. See Creating a Screen from an ERD Table.

    Image Added

    Multiple ERDs

    The same table can appear on multiple ERDs.

    ERD Example

    Expand
    titleDisplay worked example

    The below example is an ERD for a school.

    A school has entities, for example: departments, teachers, students, classrooms, and so on. All these entities are represented as tables. The lines connecting the tables show the relationships between them. We can see from this diagram that a School Department has many Classrooms and Teachers.

    Image Added

    In the Teacher table, Department is the Foreign Key and contains the same data type as the Primary Key, UID, in the SchoolDept table. 

    The Foreign Key represents the many side and the Primary Key the one side. This means that SchoolDept.UID is unique and there is only one record containing this unique information. Teacher.Department can have one or more instances of a value of UID. For example, the Maths Department UID could occur 10 times, once for each of the 10 maths teachers.

    When you create screens that show data, PhixFlow uses the relationships defined in the ERD to provide options for displaying data from related attributes in the same grid, form, card, graph or chart. This means you only need to store the School DeptID against a teacher to be able to access all of the SchoolDept details. See Displaying Data (Views).

    What's Next?

    Fundamentals Course


    Further Reading

    Child pages (Children Display)
    depth1