Documentation
(C) IBM Corp. 1996, 1999

Text Extender: Administration and Programming


The sample table DB2TX.SAMPLE

Creating a sample table describes how to create the table DB2TX.SAMPLE. This table is used in many of the examples given here. You can try these examples yourself using Text Extender.

Here is a part of the table structure showing the first and last columns:

Figure 10. The structure of the DB2TX.SAMPLE table


Part of the DB2TX.SAMPLE table

The column containing text to be searched is COMMENT. Before you can search through the text in this column, however, you must prepare the COMMENT column for use by Text Extender using the ENABLE TEXT COLUMN command. This is described in Preparing text documents for searching.

After this preparation step, the DB2TX.SAMPLE table looks like this:

Figure 11. The DB2TX.SAMPLE table after being enabled


The structure of the DB2TX.SAMPLE table--after being enabled

The table now has an additional column for handles, and each text object has a unique handle that represents it.

When you later insert text into an enabled text column, an insert trigger creates a handle for it.

Figure 12. The handle for an inserted row is created by a trigger


The handle for an inserted row is created by a trigger

A handle contains the following information:

A document ID

The name and location of the associated index

The document information: CCSID, format, and language.

The UDFs provided by Text Extender take a handle as a parameter and store, access, search for, and manipulate the text as part of the SQL processing of the table.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]