Nonstop Database, HiRDB Version 9 UAP Development Guide

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

4.16.1 What is the locator facility?

For the client UAP to accept retrieved BLOB or BINARY data in embedded variables of that data type, the client must have a memory area available for storing the data. Therefore, the memory resources of the client become overburdened when large object data is retrieved. Furthermore, the amount of data transferred from the server to the client becomes large. However, if only a portion of that data is required or if the accepted data is simply specified unchanged into another SQL statement and returned to the server, transferring all the data to the client makes processing ineffective.

HiRDB provides a locator facility to resolve this problem. A locator is a 4-byte value that identifies data on the server. When a locator embedded variable is specified in the INTO clause of a FETCH or single-row SELECT statement, a locator value that identifies that data is received as the search result instead of the actual data entity. Also, by specifying the locator embedded variable identifying the data into another SQL statement, you can execute a process that handles the data identified by the locator.

The following figure provides an overview of the locator facility.

Figure 4-73 Overview of the locator facility

[Figure]

Explanation

When the locator facility is not used:
  1. The server transfers the BLOB data retrieved from the database to the client.
  2. The client transfers the BLOB data to the server for storage in the database.

When the locator facility is used:
  1. The server creates locator data that identifies the data retrieved from the database.
  2. The server transfers the locator data to the client.
  3. The client transfers the locator data to the server.
  4. The server stores the BLOB data identified by the locator data in the database.