Using Test Data Manager to Generate Test Data

Using Test Data Manager to Generate Test Data

Adding a Foreign Key Constraint

Adding a Foreign Key Constraint

Consider the CUSTOMERS table as parent table and the TICKET table as child table. Establish a logical relationship between the tables with CUSTID as the foreign key.
  1. In the project, click
    Discover
    Tables
    .
  2. Click on the TICKET table.
  3. Click
    Constraints
    .
  4. Click
    Create New Constraint
    .
  5. Enter the following constraint properties:
    Name
    Enter CUST_ID.
    Constraint Type
    Select
    Foreign Key
    .
    Severity Level
    Select
    Major
    .
    Parent Table
    Click
    Select
    and choose CUSTOMERS.
    Enable Constraint
    Select the check box.
  6. Click
    Next
    .
    The left pane contains the child table columns and the right pane contains the parent table columns.
  7. Click the CUST_ID column from the left pane. Click the CUSTID column from the right pane. Click the
    Link
    icon to map the parent-child relationship.
    The following table shows mapping between CUSTOMERS and TICKET tables:
    The New Constraint dialog box shows the TICKET table columns in the left pane and the CUSTOMERS table columns in the right pane. The CUST_ID column in the TICKET table is mapped to CUSTID column in the CUSTOMERS table.
  8. Click
    Finish
    .

0 COMMENTS

We’d like to hear from you!