Home | Previous Page | Next Page   Data Manipulation > Using Smart Large Objects > Understanding Smart Large Objects >

Parts of a Smart Large Object

Each smart large object has two parts:

Suppose you store the picture of an employee as a smart large object. Figure 25 shows how the LO handle contains information about the location of the actual employee picture in the sbspace1_100 sbspace.

Figure 25. Parts of a Smart Large Object
begin figure description - This figure is described in the surrounding text. - end figure description

The Sbspace

An sbspace is a logical storage area that contains one or more chunks and stores only smart large objects. The sbspace can contain the following parts:

In Figure 25, the sbspace1_100 sbspace holds the actual employee image that the LO handle identifies. For more information about the structure of an sbspace, see the chapter on disk structures and storage in your IBM Informix: Administrator's Guide.

The onspaces database utility creates and drops sbspaces for the database server. For more information about the onspaces utility, see the chapter on utilities in your IBM Informix: Administrator's Guide.

Important:
Smart large objects can only be stored in sbspaces. They cannot be stored in dbspaces. You must create an sbspace before you attempt to insert smart large objects into the database.

The LO Handle

An LO handle is an opaque C data structure that identifies the location of the smart-large-object data in its sbspace. Because a smart large object is potentially very large, the database server stores only its LO handle in a database table; it can then use this LO handle to locate the actual data of the smart large object in the sbspace. This arrangement minimizes the table size.

Applications obtain the LO handle from the database and use it to locate the smart-large-object data and to open the smart large object for read and write operations. In Figure 25, the LO handle identifies the location of the actual employee image in the sbspace1_100 sbspace. You can store this LO handle in a database column to save this reference for future use. For more information, see Access to a Smart Large Object.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]