Scalable Database Server, HiRDB Version 8 UAP Development Guide

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

4.14.2 Examples of using the addition update and partial extraction facility for BLOB data

Organization of this subsection
(1) Addition update of BLOB data
(2) Partial extraction of BLOB data

(1) Addition update of BLOB data

Multiple files are stored as one BLOB data element.

[Figure]

Explanation
  1. The BLOB data of file 1 is inserted in column C2 of row A in the target table (T1).
  2. The BLOB data of file 2 is added by concatenating the data to column C2 of row A. The same applies when subsequent data is added.

(2) Partial extraction of BLOB data

The BLOB data of file 2 is extracted from the BLOB data (column C2) in row A that was stored in Addition update of BLOB data.

[Figure]

Explanation
The SUBSTR scalar function is used to extract data from the starting position (byte (100 [Figure] 1024 + 1) = byte 102401) of the data column for file 2 in column C2 of row A. Only the amount of data equivalent to the length of the data column in file 2 (200 [Figure] 1024 = 204800 bytes) is extracted.