IPL_Lesson 3_Creating Table Relationships and Data Models
IPL_Lesson 3_Creating Table Relationships and Data Models
LEARNING OBJECTIVE
A data model is where tables are connected via relationships, based on a common key (Primary key).
The figure below is a data model:
Official (Closed) - Non Sensitive
To create table relationships and data models between multiple data set,
we need to identify what are the common fields.
Both data sets contain the Product Key field, therefore, we use the
“Product Key” column from the Product Lookup data set and “Product
Key” column from the Sales Data data set as the joining key
Take a look at the values under the joining key to determine the
cardinality before joining the data
Official (Closed) - Non Sensitive
a. Menu Ribbon
b. Data / Field List
c. View Options
d. Properties Pane
e. Model Layout tabs
f. Model Canvas
Official (Closed) - Non Sensitive
Option 1
Click and drag to connect
common fields within the Model
View
Official (Closed) - Non Sensitive
Option 2
Add or Delete relationships
using the “Manage Relationship”
dialogue box.
Select the “From table” and “To
Table”
Select the common field to
join.
Click “Save” to create the new
relationship.
Official (Closed) - Non Sensitive
WHAT IS CARDINALITY
Cardinality refers to the relationship between rows of data in one table and rows in another set of table
There are 3 kinds of cardinality:
One-to-One
One-to-Many (or Many-to-One)
Many-to-Many
RELATIONSHIP CARDINALITY
In this example, there is only INSTANCE of each
“town_sht” (e.g. AMK) in the town table (noted by a
“1”, since each row contains the unique town
description (e.g. Ang Mo Kio)
WHAT’S NEXT?
01 02 03
Complete “Exercise 3 – Review Lesson 4 OAL Work on your Individual
Create Table content prior to next Assignment (20%).
Relationships and week’s class.
Models” and submit it to
Brighspace (BS).