Handling large objects
When you decide on the specific data type to represent a DataBlade module object—or its elements—keep in mind that the maximum row size for a database table is 32 KB. (Row size is the sum of the sizes of the columns in that row.)
Your HCL Informix® database server provides the LVARCHAR data type, which can hold up to 32,790 KB of text data. Larger objects and binary objects are called smart large objects, and your Informix database server provides facilities for high-performance access to smart large objects.
A smart large object is an object that is logically stored in a table column of type BLOB (binary large object, for binary data) or CLOB (character large object, for text data) but is physically stored in an sbspace.
- They provide random access to their data by using an operating-system-style interface (seek, read, write, and so on).
- They are recoverable in the event of a system crash (if the sbspace was created with logging enabled), and they obey transaction isolation modes.
- They have no maximum size.
- You can create and store indexes in them.
- You can access and manipulate them using SQL, Informix ESQL/C, or the DataBlade API.
Within SQL, the only comparison operator you can use for data of types BLOB and CLOB is Equal() (=); however, you can perform additional operations by using Informix ESQL/C or the DataBlade API from your client application.
You can also use the Large Object Locator extension to handle large objects. This DataBlade module enables you to store large object data on the client computer. The Large Object Locator extension is included with your Informix database server. You must register the routines of the module and data types in each database in which you plan to use the module.
- Is the object represented by 32,790 KB or less of text data? If so, use the built-in LVARCHAR data type.
- Is the object represented by more than 32,790 KB of text data, or by binary data? If so, use the smart large object facilities provided by your Informix database server.
- Does it make sense to store the large object on the client computer? If so, use the Large Object Locator extension.
For information about... | See... |
---|---|
Using smart large objects, including examples | HCL Informix Guide to SQL: Syntax |
Overview of smart large objects | HCL Informix Guide to SQL: Tutorial |
Creating sbspaces | HCL Informix Administrator's Guide |
Testing for the existence of a particular sbspace during DataBlade module registration | Test for an sbspace |
BLOB and CLOB data types | HCL Informix Guide to SQL: Reference |
SQL smart large object functions | HCL Informix Guide to SQL: Syntax |
Informix ESQL/C smart large object features | HCL Informix Enterprise Replication Guide |
HCL Informix DataBlade API smart large object features | HCL Informix DataBlade API Programmer's Guide |
Large Object Locator extension | IBM Informix Database Extensions User's Guide |
Most of these publications are accessible through the InfoShelf.