2. ERD Fundamentals

Introduction

Welcome to ERD Fundamentals. In this chapter we will learn about all the key techniques and principles to create our first ERD in PhixFlow, that models the data in our application.

Concepts

To find out more about the key concepts for Entity Relationship Diagrams before you take the course below, or simply to refresh your memory, see Entity Relationship Diagrams.

Video Demonstration 

Watch the video demonstration, then complete the Fundamentals Tasks below.



Fundamentals Tasks

Complete the tasks below, before moving to the next chapter. 

Task 1: Download Learning Centre Files

  1. Access the Learning Centre using the Help link in the top right corner of PhixFlow or via Learning Centre  
  2. Scroll to the bottom of the webpage and in the Sample Datasets section, download the files:
    • Companies
    • Employees
    • ISO Country Codes

Task 2: Create the ERD

  1. Select  ERD from the PhixFlow home page
  2. Click  Add New 
  3. On the Create ERD window that appears, enter the name, Data, and select Create

Task 3: Add Data to the ERD

  1. Add a new blank table from the toolbar by clicking and dragging the  Table icon onto the canvas
    1. On the Create Table window that appears, enter the name, Statusand select Confirm
  2. Add new tables from excel files by dragging the files you downloaded from the Learning Centre in Task 1 from your PC or laptop onto the canvas
  3. On the Companies table:
    1. Set the   Primary key by right-clicking on the CompanyID attribute and selecting Make/Unset Primary Key
    2. Set the   Display Name by right-clicking on the CompanyName attribute and selecting   Make Display Name
  4. Repeat these steps on the Employees table:
    1. Set the EmployeeID attribute as the   Primary key 
    2. Set the first_name attribute as the   Display Name 
  5. On the ISOCountryCodes table:
    1. Set the CountryCode attribute as the   Primary key
    2. Set the CountryName attribute as the   Display Name

Task 4: Create Relationships Between the Tables

  1. Click on the CompanyID attribute on the Companies table, and while holding down your mouse, a red relationship line will appear
    1. Release your mouse-click when it is hovering over the CompanyID attribute on the Employees table
    2. A line will appear to represent the relationship created
  2. Repeat these steps to create a relationship line from the CountryCode attribute on the ISOCountryCodes table to the CountryCode attribute on the Companies table


Further Reading (Optional)

For more information on the topics covered in this chapter, see the below links.