Nonstop Database, HiRDB Version 9 UAP Development Guide

[Contents][Index][Back][Next]

4.13.1 About partial update and retrieval of BLOB and BINARY data

If all registered BLOB or BINARY# data must be updated when new data is added, or if all BLOB or BINARY# data must be fetched when data is retrieved, both the server and client must secure large amounts of memory that match the enormous data size. Consequently, the memory resources become used up. Partial update and retrieval of BLOB and BINARY data provides the following functions to solve this problem:

#: This refers to BINARY data that has a minimum defined length of 32,001 bytes.
Organization of this subsection
(1) Addition update of BLOB or BINARY data
(2) Partial extraction of BLOB or BINARY data
(3) Rear deletion update of BLOB and BINARY data

(1) Addition update of BLOB or BINARY data

To add new data to registered BLOB or BINARY data, specify a concatenation operation in the SET clause of the UPDATE statement. The amount of memory used is suppressed to the amount of data to be added.

(2) Partial extraction of BLOB or BINARY data

To extract only the specified portion from BLOB or BINARY data, specify the SUBSTR scalar function. The amount of memory used is suppressed to the amount of data to be extracted.

(3) Rear deletion update of BLOB and BINARY data

You can delete only the rear part of BLOB or BINARY data by using the SUBSTR scalar function that specifies the columns to be processed and the literal 1 as the start position in the SET clause in the UPDATE statement. This facility enables you to limit the amount of required memory and log space because data can be updated without having to acquire as much memory as would be needed for all data that is to be updated.