Smart large object data types
A smart large object is a large object with the following features:
- A smart large object can hold a very large amount of data.
Currently, a single smart large object can hold up to four terabytes of data. This data is stored in a separate disk space called an sbspace.
- A smart large object is recoverable.
The database server can log changes to smart large objects and therefore can recover smart-large-object data in the event of a system or hardware failure. Logging of smart large objects is not the default behavior.
- A smart large object supports random access to its data.
Access to a simple large object (BYTE or TEXT) is on an “all or nothing basis; that is, the database server returns all of the simple large-object data that you request at one time. With smart large objects, you can seek to a desired location and read or write the desired number of bytes.
- You can customize storage characteristics of a smart large object.When you create a smart large object, you can specify storage characteristics for the smart large object such as:
- Whether the database server logs the smart large object in accordance with the current database log mode
- Whether the database server keeps track of the last time the smart large object was accessed
- Whether the database server uses page headers to detect data corruption
Smart large objects are stored in the database as BLOB and CLOB
data types, which you can access in two ways:
- In HCL OneDB™ JDBC
Driver 3.0,
and later, and HCL
OneDB servers
that support smart large object data types, you can use the standard
JDBC API methods described in the JDBC 3.0 specifications. This is
the simpler approach.The following JDBC 3.0 methods for BLOB and CLOB internal update have already been implemented in previous releases:
int setBytes(long, byte[]) throws SQLException
void truncate(long) throws SQLException
The following JDBC 3.0 methods from the BLOB interface are implemented in HCL OneDB JDBC Driver, Version 3.0, or later:OutputStream setBinaryStream(long) throws SQLException
int setBytes(long, byte[], int, int) throws SQLException
The following JDBC 3.0 methods from the CLOB interface are implemented in HCL OneDB JDBC Driver, Version 3.0, or later:OutputStream setAsciiStream(long) throws SQLException Writer setCharacterStream(long) throws SQLException
int setString(long, String) throws SQLException
int setString(long, String, int, int) throws SQLException
- You can use HCL OneDB extensions that are based on smart-large-object support within . This approach offers more options.