5.1.2 Loading data to a table with LOB columns

Organization of this subsection
(1) Data loading method
(2) Input data

(1) Data loading method

If a table contains LOB columns, you can load data to the LOB column structure base table and LOB columns at the same time or separately. A LOB column structure base table is the part of the table without the LOB columns. A LOB column contains BLOB data.

When a table consists of multiple LOB columns, loading data only to the LOB columns later is achieved by a facility for concurrently executing data loading to multiple LOB columns. A database is not stable if data loading has been completed in a LOB column structure base table, but has not been completed in the LOB columns. Make sure that such tables are not updated in any manner, including execution of the PURGE TABLE statement. If you are executing data loading separately, we recommend that you place the applicable RDAREA in command shutdown status to suppress updating of the table by other users.

The figure below shows the method for loading data to a table that has LOB columns.

Figure 5-2 Method for loading data to a table that has LOB columns

[Figure]

Explanation
  • Loading data to the LOB column structure base table and LOB columns at the same time
    pdload executes 1 through 4 during the first data loading.
  • Loading data to the LOB column structure base table and LOB columns separately
    Execute steps (a) and (b) in this order:
(a) Loading data to the LOB column structure base table (1 and 2)
Execute data loading to the LOB column structure base table. In this case, load data to the LOB column structure base table and output information about the LOB data from the input data to the LOB middle data.
(b) Loading data to the LOB columns (3 and 4)
Execute data loading on the LOB columns. In this case, also load the information about LOB data from the LOB middle file, which was obtained in (a) previously.

A LOB input file is provided for each column and each row. This means that there must be as many LOB input files as there are LOB columns [Figure] rows.

A LOB column input file is provided for each column. This means that there are as many LOB column input files as there are LOB columns.

(2) Input data

To load data to a table with LOB columns, you need to provide the input data in one of the following forms:

Input data fileLOB input file
Containing the data other than the LOB columns, and the LOB input file namesAs many LOB input files as there are data items to be stored
Containing the data other than the LOB columns, and the LOB dataNot needed