Large objects (LOBs)
The term large object (LOB) refers to any of the following data types: CLOB, DBCLOB, or BLOB.
CLOB
A character large object (CLOB) is a varying-length string with a maximum length of 2,147,483,647 bytes (2 gigabytes minus 1 byte). A CLOB is designed to store large SBCS data or mixed data, such as lengthy documents. For example, you can store information such as an employee resume, the script of a play, or the text of novel in a CLOB. Alternatively, you can store such information in UTF-8 in a mixed CLOB. A CLOB is a varying-length character string.
DBCLOB
A double-byte character large object (DBCLOB) is a varying-length string with a maximum length of 1,073,741,823 double-byte characters. A DBCLOB is designed to store large DBCS data. For example, you could store the information mentioned for CLOB (an employee resume, the script for a play, or the text of a novel) in UTF-16 in a DBCLOB. A DBCLOB is a varying-length graphic string.
BLOB
A binary large object (BLOB) is a varying-length string with a maximum length of 2,147,483,647 bytes (2 gigabytes minus 1 byte). A BLOB is designed to store non-traditional data such as pictures, voice, and mixed media. BLOBs can also store structured data for use by distinct types and user-defined functions. A BLOB is a binary string.
Although BLOB strings and FOR BIT DATA character strings might be used for similar purposes, the two data types are not compatible. The BLOB function can be used to change a FOR BIT DATA character string into a BLOB string.
Inline LOBs in Db2 for z/OS®
An inline LOB allows a portion of LOB data to reside in the base table space with the data from non-LOB columns. For LOBs of a size less than or equal to the specified inline length, Db2 stores the complete LOB data in the base table space. Db2 does not need to access the LOB table space or auxiliary indexes for processes that access the LOB data.
For LOBs of a size greater than the specified inline length, the inline portion of the LOB resides in the base table space, and Db2 stores the remainder of the LOB in the LOB table space. In this case, any process that accesses the LOB data must access both the base table space and the LOB table space.
For more information, see Improving performance for LOB data by using inline LOB columns