Previous Topic: Specify DB2 z/OS Using Clause Parameters for XML IndexNext Topic: Define DB2 for z/OS View Column Properties


Define a DB2 for z/OS XML Pattern for XML Index

You can create an index on an XML column to evaluate Xpath expressions efficiently and to improve performance when XML documents are queried.

To define DB2 z/OS XML Pattern for an XML Index

  1. Expand a table in the Model Explorer, expand XML Index, right-click an XML Index and then select Properties.

    The DB2 for z/OS XML Index Editor opens.

  2. Select an XML Index and work with the following options:

    Note: Click New New icon in property editors to create a new object on the toolbar to create an XML Index. Use the Enter filter text text box to filter a large list of XML Indexes to locate the one you want to work with.

    Name

    Specifies the name of the XML Index.

    Schema

    Specifies a schema for the selected XML index. Select from the drop-down list.

    Column

    Specifies the column for which the XML index is being created. Select from the drop-down list. For the selected table, only those columns for which you have specified the Physical Data Type as XML appear in the drop-down list.

    Is Unique

    Specifies whether or not the selected XML index is unique.

    Generate

    Specifies whether or not to generate DDL for this object during Forward Engineering.

  3. Work with the following options on the XML Pattern tab:
    XML Pattern

    Specifies the nodes in an XML document that you want to index.

    Index Value Data Type

    Specifies the data type to which you want to convert the indexed values before they are stored. Select from the drop-down list; valid values are Varchar and Decfloat.

    Index Value Data Type Length

    Specifies the length of the data type selected in the previous field.

  4. Click Close.

    The DB2 for z/OS XML Index Editor closes.