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
- Access the Learning Centre using the Help link in the top right corner of PhixFlow or via Learning Centre
- 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
- Select ERD from the PhixFlow home page
- Click Add New
- On the Create ERD window that appears, enter the name,
Data,
and select Create
Task 3: Add Data to the ERD
- Add a new blank table from the toolbar by clicking and dragging the Table icon onto the canvas
- On the Create Table window that appears, enter the name,
Status
,
and select Confirm
- On the Create Table window that appears, enter the name,
- 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
- On the Companies table:
- Set the Primary key by right-clicking on the CompanyID attribute and selecting Make/Unset Primary Key
- Set the Display Name by right-clicking on the CompanyName attribute and selecting Make Display Name
- Repeat these steps on the Employees table:
- Set the EmployeeID attribute as the Primary key
- Set the first_name attribute as the Display Name
- On the ISOCountryCodes table:
- Set the CountryCode attribute as the Primary key
- Set the CountryName attribute as the Display Name
Task 4: Create Relationships Between the Tables
- Click on the CompanyID attribute on the Companies table, and while holding down your mouse, a red relationship line will appear
- Release your mouse-click when it is hovering over the CompanyID attribute on the Employees table
- A line will appear to represent the relationship created
- 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.