IBM Database Add-Ins for Visual Studio  

Finding Relationships between Sources and Targets for XML Mapping  (DB2)

You can find relationships between elements and attributes in the source XML schema document and columns in DB2 relational target tables. After the relationships are discovered, you can select the specific relationships for which you want to define map links.

Requirement:  An instance of the IBM XML Schema Mapping Designer must be open, with an XML schema displayed in the Source XML schema pane.

To find relationships:

  1. Right-click in the Mapping Editor section of the Annotated XML Schema view of the designer, and then select Find Same Name on the shortcut menu.

    The Find Same Name window opens.

  2. In the Source list, clear the check boxes of the nodes, elements, and attributes for which you do not want to find relationships.

    If you clear the check box of a node, the check boxes of all of its children are automatically cleared. You can then select the check boxes of one or more of the individual children.

    To locate a specific node, element, or attribute, perform the following steps:

    1. Right-click in the Source pane, and then select Search on the shortcut menu.
    2. In the Find Text window, type the name of the node, element, or attribute that you want to find, and then click Search.

      If the name that you typed is found, focus in the Source pane shifts to the node, element, or attribute with that name. To find additional occurrences of the name, click Search Again in the Find Text window.

  3. In the Target list, clear the check boxes of the schemas, tables, and columns for which you do not want to find relationships.

    If you clear the check box of a schema or a table, the check boxes of all of its children are automatically cleared. You can then select the check boxes of one or more of the individual children.

    To locate a specific schema, table, or column, perform the following steps:

    1. Right-click in the Target pane, and then select Search on the shortcut menu.
    2. In the Find Text window, type the name of the schema, table, or column that you want to find, and then click Search.

      If the name that you typed is found, focus in the Target pane shifts to the schema, table, or column with that name. To find additional occurrences of the name, click Search Again in the Find Text window.

  4. Click Discover.

    The columns in the relational tables that have the same name as an element or an attribute in the source XML schema are shown in the Discovery result list.

  5. Accept or reject one or more of the matches.
    • To create map links for all of the matches that are listed in the discovery results, click Accept All.
    • To create map links for one or more of the individual matches in the discovery results, select the matches that you want to create map links for, and then click Accept.

      Use Ctrl or Shift to select multiple matches.

    • To remove one or more of the individual matches from the discovery results, select the matches that you want to remove, and then click Reject.

      Use Ctrl or Shift to select multiple matches.

      Tip: You might reject individual matches before creating map links for all of the remaining matches.

    • To remove all of the matches from the discovery results, click Reject All.
  6. To discover additional relationships, clear the check boxes that are currently selected in the Source and Target lists, and then return to step 2 to select the check boxes for new items.
  7. Click Close to close the Discover Relationships window.

See Also

Annotating XML Schemas | IBM XML Schema Mapping Designer


.NET Development Forum   DB2 FAQs

© Copyright IBM Corporation 2002, 2019. All Rights Reserved.