A large object is a data object that is logically stored in a table column but physically stored independent of the column. Large objects are stored separate from the table because they typically store a large amount of data. Separation of this data from the table can increase performance.
Figure 4 shows the large-object data types.
Only Dynamic Server supports BLOB and CLOB data types.
For the relative advantages and disadvantages of simple and smart large objects, see the IBM Informix: Database Design and Implementation Guide.
Simple large objects are a category of large objects that have a theoretical size limit of 231 bytes and a practical limit that your disk capacity determines. Informix database servers support these simple-large-object data types:
No more than 195 columns of the same table can be declared as BYTE or TEXT data types. Unlike smart large objects, simple large objects do not support random access to the data. When you transfer a simple large object between a client application and the database server, you must transfer the entire BYTE or TEXT value. If the data cannot fit into memory, you must store the data value in an operating-system file and then retrieve it from that file.
The database server stores simple large objects in blobspaces. A blobspace is a logical storage area that contains one or more chunks that only store BYTE and TEXT data. For information on how to define blobspaces, see your IBM Informix: Administrator's Guide.
Smart large objects are a category of large objects that support random access to the data and are generally recoverable. The random access feature allows you to seek and read through the smart large object as if it were an operating-system file.
Smart large objects are also useful for opaque data types with large storage requirements. (See the description of opaque data types in Opaque Data Types.) They have a theoretical size limit of 242 bytes and a practical limit that your disk capacity determines.
Dynamic Server supports the following smart-large-object data types:
Dynamic Server stores smart large objects in sbspaces. An sbspace is a logical storage area that contains one or more chunks that store only BLOB and CLOB data. For information on how to define sbspaces, see your IBM Informix: Performance Guide.
When you define a BLOB or CLOB column, you can determine the following large-object characteristics:
Use of these characteristics can affect performance. For information, see your IBM Informix: Performance Guide.
When an SQL statement accesses a smart-large-object, the database server does not send the actual BLOB or CLOB data. Instead, it establishes a pointer to the data and returns this pointer. The client application can then use this pointer in open, read, or write operations on the smart large object.
To access a BLOB or CLOB column from within a client application, use one of the following application programming interfaces (APIs):
For information on smart large objects, see the IBM Informix: Guide to SQL Syntax and IBM Informix: Database Design and Implementation Guide.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]