Page in draft: this should be the concept page for data.
Panel | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
Overview
The end point an application that displays data to users and lets them make changes
- screen displays data in grids and charts → view
- user adds, removes or changes the data - form fields, buttons which are wired to actionflows
changing individual or small numbers of records - transactional changes.
You can also bulk change. Use an analysis model for complex processing of large number of data records.
Data structure: Use ERDs define the logical structure of the data that your application using tables and relationships. Needed for the views you show in screens, so that you can design views on data from different tables.
- Other page
- Defining Data Structures using ERDs
Action types and table types - calclulate etc.
Panel | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
You can:
- either define an ERD before adding any data to PhixFlow. In this case you create the tables, attributes and relationships
- or you can load data from external sources first. You can then drag tables into the ERD and simply add the relationships.
Getting Data in
- loading data page to do??: New concept page
- Enter data yourself
- Load excel files
- Use an analysis model
- generate test data
- API to import from a tool
- using input multipliers
Seeing Data
If you are working with tables that have records, to see them:
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Overview
Entity Relationship Diagrams (ERDs) define the structure of the data in your application. "Entities" are displayed as tables and represent the "things" in the world that you want to show as data.
Opening and Creating ERDs
- On your application's home page, click
to list the existing ERDs.Insert excerpt _erd _erd nopanel true - Alternatively, click
from the header bar.Insert excerpt _erd _erd nopanel true
- Alternatively, click
- To create a new ERD, click the
button.Insert excerpt _add _add nopanel true - To open an existing ERD, double-click it.
ERD Layout
Here is a simplified view of the ERD:
Expand | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||
|
Tables
A table is where your data is stored for your application. Click on the image below to enlarge it.
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, integer, true/false) and properties. To change these, click on the attribute's name. See Understanding Data Types.
Primary Keys
s are special attributes which uniquely identify each record. Insert excerpt _key_primary _key_primary nopanel true
When you create a new table, PhixFlow adds an attribute called UID (Unique IDentifier) 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 Employees table has the attribute EmployeeID 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.
Secondary Keys
s are attributes that index records and do not have to be unique. Insert excerpt _key_secondary _key_secondary nopanel true
- When creating relationships on the ERD, one attribute in the relation must be either a Primary Key or a Secondary Key
Example: In a student records table, if a student ID is the primary key, a student's email address or phone number could be a secondary key. This allows data to be retrieved using these attributes even if the student ID is not known.
Foreign Keys
s are attributes in one table that relate to the Primary Key or Secondary Key in another table. Insert excerpt _key_foreign _key_foreign nopanel true
- Foreign Keys must have the same data type as the corresponding Primary Key or Secondary Key. For example, both must be strings and of the same length.
Info |
---|
When a relationship is created by dragging a Primary Key or Secondary Key from one table onto the attribute of another table, PhixFlow sets this attribute to be a Foreign Key. |
Display Names Anchor DisplayName DisplayName
DisplayName | |
DisplayName |
Display Names are special attributes which are displayed instead of a Foreign 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 Foreign Key when displayed on a screen as part of a relational view, see Using Relational Views. 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.
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 attribute, will be applied wherever that attribute is updated, such as when saving data on an input screen. See Adding Validation to Table Attributes.
Indexing
Indexes are applied to attributes on a table and help improve the speed of data retrieval when handling large data sets. See Indexing.
Relationships Between Tables
Anchor | ||||
---|---|---|---|---|
|
For full information on table relationships, including multi-hop relationships, see Understanding Table Relationships.
Working in an ERD
You can add tables in an ERD manually. See Adding Data and Tables to an ERD.
- Create a new table by dragging
from the toolbar onto the canvas.Insert excerpt _tables _tables nopanel true - Add an Excel spreadsheet or CSV file by dragging it onto the canvas. PhixFlow imports the data and creates a new table. Note, the expected format is the header is the first row followed by the data. If your data is in a different format, this is supported, see Importing Data from Excel (Advanced).
- Add an existing table by clicking
in the toolbar. The available tables are listed in the Repository and can be dragged onto the canvas.Insert excerpt _tables _tables nopanel true - If you have data in an external source such as database and wish to add this data, it will first need to be imported. See Importing Data.
View Table Data
Anchor | ||||
---|---|---|---|---|
|
To view the data in a table, click
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Create a Screen from a Table
Select
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Multiple ERDs
The same table can appear on multiple ERDs.
ERD Example
Expand | ||
---|---|---|
| ||
The below example is an ERD for a school. A school has entities, for example: departments (SchoolDept), teachers, students, class rooms, 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 Departments (SchoolDept) has many Classrooms and Teachers. 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?
The PhixFlow Fundamentals course provides a practical guide to using PhixFlow, including setting up ERDs.
Already started PhixFlow Fundamentals?
Return to ERD Fundamentals
Further Reading
Child pages (Children Display) | ||
---|---|---|
|