In this lesson, you create logical relationships between tables in the source data.
Lesson Concepts
Relationships might exist between data in tables even though a primary key relationship does not exist in the data source. In the absence of physical keys in the data, there must be a way to indicate related tables so that the tables are included in a data subset you create in TDM.
You can create relationships between tables that you want to include in a subset operation in TDM. Relationships that you create in TDM are logical relationships. Logical relationships do not impact the data in the data source. When you create an entity, TDM uses the relationships between tables to determine the tables to include in the entity. By using the entity in a subset operation, you ensure that all related tables are included in the subset operation.
Identify relationships that you want to add to the TDM repository and then create the logical relationships as constraints in Test Data Manager. You can create relationships with either major or minor severity. The severity determines the scope of the data that a data subset receives based on the constraints. When you define a constraint with a major severity level, all of the children of the parent are included in the data subset. When you do not want the parent table to select additional child table records that are related to the parent, you assign a minor constraint between two tables.
Lesson Objectives
The source data contains customer information spread across tables with no physical keys in the source data. You must create a subset that contains all information on a particular set of customers. The tables CUSTOMER, CUSTS_WITH_INCOMPLETE_COUPONS, and STATEMENT_LINE have customer information that you must include in the subset data. By creating a relationship between these tables, you ensure that all the tables are included in an entity when you create an entity with one of the tables. All three tables have a customer ID column. Create foreign key relationships on the CUSTS_WITH_INCOMPLETE_COUPONS and STATEMENT_LINE tables that link them to the customer ID column in the CUSTOMER table.
In this lesson, you complete the following tasks:
Create a constraint on the CUSTS_WITH_INCOMPLETE_COUPONS table to create a logical relationship between the CUSTOMER and CUSTS_WITH_INCOMPLETE_COUPONS tables.
Create a constraint on the STATEMENT_LINE table to create a logical relationship between the CUSTOMER and STATEMENT_LINE tables.
Lesson Prerequisites
Before you start this lesson, complete the earlier lessons in this tutorial.
Lesson Timing
Set aside 20 minutes to complete the tasks in this lesson.