Read and write simple large objects to an optical disc (UNIX)
In a table, columns
of type simple-large-object do not include the simple-large-object
data in the table itself. Instead, the simple-large-object column
contains a 56-byte simple-large-object descriptor that includes a
forward pointer (rowid) to the location where the first segment of
simple-large-object data is stored. The descriptor can point to a
dbspace blobpage, a blobspace blobpage, or a platter in an optical
storage subsystem. For details, see your HCL OneDB™
Administrator's Guide and
the .
When
a simple large object is stored on a write-once-read-many (WORM) optical-storage
subsystem, you can have a single physical simple large object in more
than one table to conserve storage space on the WORM optical disc.
The LOC_DESCRIPTOR flag enables you to migrate a simple-large-object
descriptor, rather than the simple large object itself, from one table
to another.
When you read or write a simple-large-object column
that is stored on a WORM optical disc, you can manipulate only the
simple-large-object descriptor if you set the loc_oflags field
of the locator structure to LOC_DESCRIPTOR.
Important: Only
use LOC_DESCRIPTOR with simple large objects that are stored on WORM
optical media.
The following figure shows a code fragment that selects
the stock_num, manu_code, cat_descr, and cat_picture columns
from the catalog table of the named database. The program uses
the DESCR() SQL function expression to retrieve the simple-large-object
descriptor, rather than to retrieve the simple large object itself,
for the cat_picture column. The program then sets the loc_oflags field
of the cat_picture locator structure to LOC_DESCRIPTOR to signal
that the simple-large-object descriptor, rather than the simple large
object, is to be inserted into the cat_picture column of the pictures table.
The result is that the cat_picture columns in both the catalog and pictures tables
refer to a single set of physical simple large objects.
You can also use the SQL DESCR() function
to achieve the same result without a loc_oflags value of LOC_DESCRIPTOR.
The SQL statement shown in the following figure accomplishes the same
task as the locator structure in the preceding example.
Have feedback?
Google Analytics is used to store comments and ratings. To provide a comment or rating for a topic, click Accept All Cookies or Allow All in Cookie Preferences in the footer of this page.