Adding Child Tables in Subscription Service

After you add child tables in Publication Service, you can use the same way to add tables in Subscription Service. After that, you can map the tables in Subscription Service with the tables in Publication Service.

When you add a child table, TIBCO ActiveMatrix Adapter for Database (TIBCO Business Studio) creates a class object in the repository for the child table and an association object for the parent-child relationship.

Prerequisites

A destination table named SUB_CUSTOMER is added in Subscription Service. For details on how to add a table in the Schema tab for Subscription Service, see Fetching a Table After Creating Subscription Service.

Procedure

  1. In the Schema tab, select the SUB_CUSTOMER table and click Add Child table .
  2. In the "Table name Pattern" window, specify another search criterion, such as SUB_ORDER_DETAILS%.
  3. In the "Select table" window, select SUB_ORDER_DETAILS from the table list and click Finish.
    A child table SUB_ORDER_DETAILS is added to the destination table SUB_CUSTOMER.
  4. Optional: If you click Next in Step 3, you can edit the selected table by selecting or clearing the Use check box next to a table column.
    If the Use check box next to a table column is cleared, the table column is not used. By default, all columns of the table are selected.
  5. Expand the SUB_ORDER_DETAILS table and add a join between the SUB_CUSTOMER table and SUB_ORDER_DETAILS table.
    1. In the SUB_ORDER_DETAILS CUSTID entry, select the User Key check box and then click the Join To list.
    2. Select SUB_CUSTOMER.CUST_ID from the Join To list and click Save on the toolbar.
    The destination table and the child table are joined together.

  6. To add child tables to the SUB_ORDER_DETAILS table, repeat Step 1 to Step 5.
    Two child tables, SUB_INTERNAL_ORDER_ITEMS and SUB_EXTERNAL_ORDER_ITEMS, are added and jointed to the SUB_ORDER_DETAILS table.