Use the QbCreateCatalog API or the CREATE QBIC CATALOG command
to create a QBIC catalog. To create the catalog, you must be the owner of the user table whose images will be cataloged. In addition, you must have CREATE TABLE authority for the database that will contain the catalog. The user table and image column must be enabled for the Image Extender before you create a QBIC catalog for the images in that column.
When you create a QBIC catalog, you:
Manual cataloging means that you explicitly request the Image Extender to catalog an image. (See Manually cataloging an image for information on how to manually catalog an image.)
The user table and column must be enabled: The user table and the column must be enabled for the Image Extender before you create a QBIC catalog for the images in that column. (See Chapter 6, Preparing data objects for extender data for information on enabling user tables and columns for the Image Extender.)
Using the API: When you use the QbCreateCatalog API, you indicate automatic or manual cataloging by specifying an auto-catalog value. A value of 1 indicates automatic cataloging; a value of 0 indicates manual cataloging.
For example, the following statements create a QBIC catalog for the images in the picture column of the employee table. The images will be automatically cataloged when they are stored in the employee table:
SQLINTEGER autoCatalog=1; /* automatic cataloging */ rc=QbCreateCatalog( "employee", /* user table */ "picture", /* image column */ autoCatalog); /* auto catalog setting */
Using the command line: When you issue the CREATE QBIC CATALOG command, you indicate automatic cataloging by specifying ON. You indicate manual cataloging by specifying OFF. OFF is the default.
For example, the following command creates the same QBIC catalog as in the API example:
CREATE QBIC CATALOG employee picture on
Back up the QBIC catalog: The Image Extender stores a QBIC catalog in files. You should periodically back up these files in case you need to recover the catalog. In an AIX, HP-UX, or Sun Solaris server, the files are located in the /home/instance_owner/dmb/qbic directory, where, instance_owner is the user ID of the instance owner. In an OS/2 or Windows server, the files are located in the \destination\instance\instance_name\qbic directory, where destination is the directory where the Image Extender is installed, and instance_name is the name of the extender instance.