IBM Books

Image, Audio, and Video Extenders Administration and Programming


Preparing a table

The DBA creates the employee table and enables it and the picture column for use by the Image Extender.

What the DBA does: For convenience, the DBA adds the mmdbsys schema in the current function path by using the following SQL statement:

SET CURRENT FUNCTION PATH = mmdbsys, CURRENT FUNCTION PATH

This allows UDT and UDF names to be specified without having to prefix them with the mmdbsys schema name. (The mmdbsys schema does not have to be the first schema in the function path.) See UDF and UDT names for more information about UDT and UDF names.

The DBA creates the employee table. The DBA uses the DB2 command-line processor to issue the following SQL statement:

 
CREATE TABLE   employee            /*name of the table*/
       (id      CHAR(6)            /*employee identification*/
       name    VARCHAR(40)         /*employee name*/
       picture DB2IMAGE)           /*employee picture*/

The DBA then uses the db2ext command-line processor to issue the following commands:

ENABLE TABLE employee FOR DB2IMAGE 
ENABLE COLUMN employee picture FOR DB2IMAGE

What happens: In response to the ENABLE TABLE command, the Image Extender:

In response to the ENABLE COLUMN command, the Image Extender:


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