View Table Relationships

You can view table relationships in the CA TDM Portal while creating data generation rules. Table relationships help you understand how tables are related to each other. You can use this information to select appropriate tables for which you can write necessary data generation rules.
tdm49
You can view table relationships in the CA TDM Portal while creating data generation rules. Table relationships help you understand how tables are related to each other. You can use this information to select appropriate tables for which you can write necessary data generation rules.
You can view the following information that is related to table relationships:
  • List of tables that are related to a specific table.
  • Foreign key relationships for a table.
  • Parent-child relationships for a table.
Table relationships information is available in the
Registered Tables
and
<Table_Name> Relationships
dialogs. You can access these dialogs when defining data generation rules. To view the table relationships information, follow these steps:
  1. Access the CA TDM Portal.
  2. Select an appropriate project and its corresponding version from the
    Project
    drop-down list in the top blue bar.
    This selection sets the required project and version context for all the related operations that you perform in the Portal.
  3. Click the
    Generators 
    option in the left pane.
    The
    Generators
    page opens. This page lists the available generators.
    Note:
    If the left pane is not visible, click the icon (represented by three horizontal bars) in the top left corner.
  4. Click the appropriate data generator for which you want to view table relationships.
  5. Click the 
    Select Tables
    button.
    The
    Registered Tables
    dialog opens.
  6. Click the arrow (
    >
    ) that is present before the table name to expand the table row.
    Note:
    Availability of an arrow before the table name indicates that the table is related to other tables.
    A list of all related tables appears.
  7. Review the displayed relationships. The relationships are represented with the help of a key symbol and Crow's Foot notation.
    Note:
     The information that the Crow's Foot notation depicts comes from Datamaker (if it exists in Datamaker for the specific tables).
    The following example screen shot helps you understand how to decipher the relationships:
    Table_Relationships.png
    In this example, the selected table "purchase" is related to two tables—items and shipTo—as follows:
    • A foreign key with
      One to One
      relationship exists between the "purchase" and "items" tables. This information is represented in the screen shot with the help of a key symbol and Crow's Foot notation.
    • A foreign key relationship exists between the "purchase" and "shipTo" tables. 
  8. To find detailed information about the relationships for the selected table (for example, purchase), follow these steps:
    1. Click the table in the
      Registered Tables
      dialog to display it in the
      <Data Generator Name>
      page (which is displayed in the background).
    2. Close the
      Registered Tables
      dialog.
    3. Click the Related tables icon for the table (for example, purchase).
      The
      <Table_Name> Relationships
      dialog opens. 
    4. Review the relationships information in the dialog.
      The following example screen shot helps you understand the details of the relationships:
      Related_Tables_Details.png
      In this example, when you expand the relationship information between the "purchase" table and the "items" table, the following details are shown:
      • In the first row, the "SHRED_ID" column is a primary key in the "purchase" table. This is represented with the help of a key symbol in orange color. This column is referenced by the "purchase_SHRED_ID" column in the related "items" table. Therefore, the "purchase_SHRED_ID" column is a foreign key in the "items" table. The key symbol in this case is shown in blue color. 
      • The second row shows the One to One relationship information between the columns; in this case, the columns are "SHRED_ID" for both the tables.
      Similarly, when you expand the relationship between the "purchase" table and the "shipTo" table, the following details are shown:
      • The "SHRED_ID" column is a primary key in the "purchase" table. This is represented with the help of a key symbol in orange color. This column is referenced by the "purchase_SHRED_ID" column in the related "shipTo" table. Therefore, the "purchase_SHRED_ID" column is a foreign key in the "shipTo" table, too. The key symbol in this case is shown in blue color.
      This information enables you to identify the parent-child relationships between the selected and the related tables.
    5. Click a table row in the 
      <Table_Name> Relationships
      dialog to add that table to the background page (
      <Data Generator Name>
      ).
  9. Follow the usual steps as mentioned in Create Data Generation Rules to generate data generation rules.