JDBC Driver for SQL/MP 3.0

A BLOB represents a Binary Large OBject. A CLOB represents a Character Large OBject. BLOBs are typically used
to store images (such as GIFs) or serialized objects in the database. CLOBs are typically used to store large character
data (such as an XML file) in the database.
Because SQL/MP does not support either the Clob or the Blob data type, JDBC provides an alternative method that
stores the contents of a BLOB or CLOB in an Enscribe file and stores the name of that file in the column associated
with the BLOB or CLOB. From the point of view of the JDBC user, a BLOB or CLOB is any Java object that extends
from the java.lang.Object class. BLOBs and CLOBs must be serializable objects and must implement the
java.io.Serializable interface. This enables the JDBC driver to:
Serialize a BLOB or CLOB object into an array of bytes to be stored in a BLOB/CLOB file.
Deserialize the contents of the BLOB/CLOB file to re-create the original object.
Because the JDBC driver creates and reads BLOBs and CLOBs in the same manner, the rest of this description refers
only to BLOBs. You must define a CLOB in exactly the same manner as a BLOB and use the BLOB syntax.
SQL/MP Table Definition
To use the Blob data type, you must define a column in the associated SQL/MP table to store the name of the Enscribe
file associated with that BLOB. The data type of the column must be either CHARACTER or VARCHAR and must be long
enough to store the Enscribe file name (at least 36 characters).
Creating a BLOB
A client JDBC application that needs to store a BLOB in an SQL/MP database table or retrieve a BLOB from an
SQL/MP database table provides a java.util.Properties object to the JDBC driver during connection time. This
Properties object provides the driver with all the information it needs to create or read the BLOB. An additional
required property, called a BlobMapFile property, specifies a unique file name in the $volume.subvolume.filename
format. This file stores a list of all the BLOB files created by a particular application. This file is later used by the
Cleanup Utility to remove obsolete BLOB files.
BlobInfo Properties
BlobInfo properties provide information about all table columns that are used to store BLOBs. Each BlobInfo
property consists of a key and value pair. The key is used to identify a unique BlobInfo property. The value specifies
a particular BLOB column in a table, the catalog for that table, and file locations where BLOB files should be created.
The Properties object should contain one 'BlobInfo' property for every table column that contains BLOBs. A
BlobInfo property is identified by a key of type 'BlobInfoN', where N represents a unique number used to identify
that property.
Format of a BlobInfo Property
The format of a BlobInfo property is:
BlobInfoN, sqlmp_table_name, column_name, sqlmp_catalog_of_Blob_table, $vol.subvol [, ... ]
where
N
is a unique number used to identify the BlobInfo property.
sqlmp_table_name
is the name of the BLOB table.
column_name