Large object data types
You can use large object data types to store audio, video, images, and other files that are larger than 32 KB.
The VARCHAR, VARGRAPHIC, and VARBINARY data types have a storage limit of 32 KB. However, applications often need to store large text documents or additional data types such as audio, video, drawings, images, and a combination of text and graphics. For data objects that are larger than 32 KB, you can use the corresponding large object (LOB) data types to store these objects.
Db2 provides three data types to store these data objects as strings of up to 2 GB in size:
- Character large objects (CLOBs)
- Use the CLOB data type to store SBCS or mixed data, such as documents that contain single character set. Use this data type if your data is larger (or might grow larger) than the VARCHAR data type permits.
- Double-byte character large objects (DBCLOBs)
- Use the DBCLOB data type to store large amounts of DBCS data, such as documents that use a DBCS character set.
- Binary large objects (BLOBs)
- Use the BLOB data type to store large amounts of noncharacter data, such as pictures, voice, and mixed media.
If your data does not fit entirely within a data page, you can define one or more columns as LOB columns. An advantage to using LOBs is that you can create user-defined functions that are allowed only on LOB data types.