Using Smart Large Objects
- The SELECT statement returns a handle value to the BLOB or CLOB value that the projection list specifies. SELECT does not return the actual data for the BLOB or CLOB column that the projection list specifies. Instead, it returns a handle value to the column data.
- The INSERT and UPDATE statements do not send the actual data for the BLOB or CLOB column to the database server. Instead, they accept a handle value to this data as the value to be inserted or updated.
- From within programs, use the library functions that access smart large objects. For more information, see the HCL OneDB™ ESQL/C Programmer's Manual.
- From within a C program such as a DataBlade® module, use the Client and Server API. For more information, see your HCL OneDB DataBlade Developers Kit User's Guide.
You cannot use the name of a smart-large-object column in expressions that involve arithmetic operators. For example, operations such as addition or subtraction on the smart-large-object handle value have no meaning.
- The chance of lock contention on a CLOB or BLOB column increases. If two columns share the same smart-large-object value, the data might be locked by either column that needs to access it.
- The CLOB or BLOB value can be updated from a number of points.
To remove these constraints, you can create separate copies of the BLOB or CLOB data for each column that needs to access it. You can use the LOCOPY function to create a copy of an existing smart large object.
You can also use the built-in functions LOTOFILE, FILETOCLOB, and FILETOBLOB to access smart-large-object values, as described in Smart-Large-Object Functions. For more information on the BLOB and CLOB data types, see the HCL OneDB Guide to SQL: Reference.