Scalable Database Server, HiRDB Version 8 Description

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

6.8.11 BLOB data file output facility

The following issues arise if BLOB data stored in a HiRDB server is to be retrieved by a client:

To mitigate such increases in the memory requirements associated with BLOB data retrievals, you can provide settings so that, instead of retrieved BLOB data being returned to the client, it is output to a unit in which either a single server or a front-end server is running. This means that only the server IP address and the file name need to be returned to the client. This is called the BLOB data file output facility.

Figure 6-15 provides an overview of the BLOB data file output facility.

Figure 6-15 Overview of the BLOB data file output facility

[Figure]

Explanation
  1. When the BLOB data is retrieved from the client, it is output to the file row by row, and column by column.
  2. The name of the file to which the BLOB data is output in (1) is returned to the client.
  3. Based on the returned file name, access is made to the BLOB data file located at the server.
Organization of this subsection
(1) Application criteria
(2) Specification
(3) Notes on using the BLOB data file output facility
(4) Examples of using the BLOB data file output facility

(1) Application criteria

Use this technique to reduce memory requirements associated with BLOB data retrievals. This technique reduces the memory required for the client program and for inter-client communication buffers, at the expense of increased disk input/output time and capacity at the server. Therefore, if this technique is to be used, the tradeoff between memory requirements and disk input/output time must be evaluated.

(2) Specification

Use of the BLOB data file output facility is specified in a WRITE specification of the SQL. A WRITE specification can be specified in either a cursor specification or a query specification. For details about WRITE specifications, see the HiRDB Version 8 SQL Reference.

The client can obtain as the SQL retrieval results only the IP address of the server, the BLOB data storage location that is set in the SQL, and the file name of the BLOB data. With this information, the client is able to identify the particular BLOB data stored at the server.

(3) Notes on using the BLOB data file output facility

(4) Examples of using the BLOB data file output facility

Shown as follows are examples of retrievals using the BLOB data file output facility.

(a) Retrieval from BLOB columns

Retrieve columns C1 and C2 from table T1. The system outputs the BLOB data from C1 to a file, and obtains the file name. Figure 6-16 shows this example retrieval using the BLOB data file output facility (retrieval of BLOB columns).

Figure 6-16 Example of a retrieval using the BLOB data file output facility (retrieval of BLOB columns)

[Figure]

(b) Retrieval of an abstract data type with the BLOB attribute

From table T2, retrieve column ADT1 that makes the CONTAINS function TRUE. In this case, the BLOB value resulting from passing the column value to an argument of the EXTRACTS function is output to a file, and the file name is obtained. In this example, all entries are retrieved. Figure 6-17 shows this example retrieval using the BLOB data file output facility (retrieval of an abstract data type with the BLOB attribute).

Figure 6-17 Example of a retrieval using the BLOB data file output facility (retrieval of an abstract data type with the BLOB attribute)

[Figure]