Neoview JDBC Type 4 Driver Programmer's Reference (R2.2, R2.3, R2.4, R2.5)
5 Working with BLOB and CLOB Data
This chapter describes working with BLOB and CLOB data in JDBC applications. You can use the
standard interface described in the JDBC 3.0 API specification to access BLOB and CLOB data in
a Neoview database with support provided by the Type 4 driver.
BLOB and CLOB are not native data types in a Neoview database. But, database administrators
can create and manage Neoview database tables that have BLOB and CLOB columns by using
the Type 4 driver or other tools as described in Chapter 6 (page 59).
For management purposes, CLOB and BLOB data is referred to as large object (LOB) data, which
can represent either data type.
NOTE: BLOB and CLOB data types are not supported when using stored procedures in Java
(SPJs).
The topics in this chapter are organized in these categories:
TopicCategory
• “Architecture for LOB Support” (page 51)
• “Setting Properties for the LOB Table” (page 52)
The Physical Files
• “Storing CLOB Data” (page 52)
• “Reading CLOB Data” (page 54)
• “Updating CLOB Data” (page 54)
• “Deleting CLOB Data” (page 55)
Accessing CLOB Data
• “Storing BLOB Data” (page 55)
• “Reading Binary Data from a BLOB Column” (page 57)
• “Updating BLOB Data” (page 57)
• “Deleting BLOB Data” (page 58)
Accessing BLOB Data
• “NULL and Empty BLOB or Empty CLOB Value” (page 58)
• “Transactions Involving Blob and Clob Access” (page 58)
• “Access Considerations for Clob and Blob Objects” (page 58)
Miscellaneous
Architecture for LOB Support
The tables that support LOB data are:
Base table
Referenced by JDBC applications to insert, store, read, and update BLOB and
CLOB data. In the base table, the Type 4 driver maps the BLOB and CLOB columns
into a data-locator column. The data-locator column points to the actual LOB
data that is stored in a separate user table called the LOB table.
LOB table
Actually contains the BLOB and CLOB data in chunks. A Clob or Blob object
is identified by a data locator. LOB tables have two formats: LOB table for BLOB
data and a LOB table for CLOB data.
Architecture for LOB Support 51