7.1 Overview of the Data Interface for LOBs

The data interface for LOBs includes a set of Java and OCI APIs that are extended to work with the LOB data types.

These APIs, originally designed for use with legacy data types such as VARCHAR2, RAW, LONG, and LONG RAW, can also be used with the corresponding LOB data types shown in the following table. The table shows the legacy data types in the bind or define type column and the corresponding supported LOB data type in the LOB column type column. You can use the data interface for LOBs to store and manipulate character data and binary data in a LOB column just as if it were stored in the corresponding legacy data type. The data interface supports data size up to two gigabytes minus one (2 GB - 1), the maximum size of an sb4 data type.

Note:

The data interface works for persistent and temporary LOBs and LOBs that are attributes of objects. In this chapter LOB columns means LOB columns and LOB attributes.

While most of this discussion focuses on character data types, the same concepts apply to the full set of character and binary data types listed in the following table. CLOB also means NCLOB in the table.

Table 7-1 Corresponding LONG and LOB Data Types in OCI

Bind or Define Type LOB Column Type Used For Storing

SQLT_AFC(n)

CLOB

Character data

SQLT_CHR

CLOB

Character data

SQLT_LNG

CLOB

Character data

SQLT_VCS

CLOB

Character data

SQLT_BIN

BLOB

Binary data

SQLT_LBI

BLOB

Binary data

SQLT_LVB

BLOB

Binary data