8. Understanding JDBC Connectivity : JDBC Implementation Considerations : BLOB Column Handling
 
Share this page                  
BLOB Column Handling
Large Data Objects
Long, variable length data can be stored in columns of type LONG BYTE, LONG VARCHAR, and LONG NVARCHAR. Columns of these types are collectively referred to as Large Objects (LOB) and are further distinguished as binary (BLOB), character (CLOB), and National Character Set (NCS or Unicode – NLOB). Handling values of these types is somewhat different than smaller, fixed length types such as integers and strings and, depending on the representation, can place restrictions on how the data is retrieved and used, and impact the performance of an application.
The JDBC Driver can represent LOB values in three different ways:
As a data stream within the application
As a reference (called a LOCATOR) to the value stored in the database
As a cached value
When first introduced, Ingres LOB values were only represented as streams of bytes or characters. Ingres 9.2 introduces the capability of retrieving a LOCATOR reference to a LOB value and accessing the value as it resides in the database through the reference. In addition, the JDBC Driver provides the capability of loading a LOB data stream or LOCATOR reference and caching the LOB data in the driver.
These three representations, how they are manifested in JDBC, and the impact they have on an application are discussed here.