The DataBlade API provides the smart-large-object interface for access to smart large objects. This interface contains a set of functions and data types to provide access to smart large objects. (For more information, see Using the Smart-Large-Object Interface.) The smart-large-object interface provides access to the smart large object through its LO handle, as follows:
A SELECT statement on a CLOB, BLOB, or opaque-type column retrieves an LO handle for a smart large object. It does not retrieve the actual data for the smart large object because this data resides in an sbspace.
The LO handle identifies the location of the smart large object on disk.
The LO handle identifies the smart large object to open. Once you open the smart large object, you obtain an LO file descriptor, which you can use to read data from the sbspace of the smart large object.
Because a smart large object can be quite large, it is not practical to store it directly in the database table. Instead, the INSERT and UPDATE statements store the LO handle of the smart large object in the CLOB, BLOB, or opaque-type column. The data of the smart large object resides in an sbspace.
For most smart large objects, the sbspace name is the only storage characteristic that you need to specify. The smart-large-object optimizer can calculate values for all other storage characteristics. You can set particular storage characteristics to override these calculated values. However, most applications do not need to set storage characteristics at this level of detail. For more information, see Obtaining Storage Characteristics.
When you create a smart large object, you obtain an LO handle and an LO file descriptor for the new smart large object.
Use the LO file descriptor to identify the smart large object whose data you want to write to the sbspace.
The LO handle for the smart large object identifies the location of the smart large object on disk. Once you have written the data to the smart large object, provide its LO handle to the INSERT or UPDATE statement to save it in the database. The smart-large-object data remains in the sbspace.
When you store an LO handle in the database, the database server can ensure that the smart large objects are only freed when no more database columns reference them. For more information, see Deleting a Smart Large Object. For information on how to insert a smart large object from within a DataBlade API module, see Creating a Smart Large Object.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]