Databases Reference
In-Depth Information
The data comes in a record delimited format with fixed field size.
Note: we saw the record delimiter parameter before in the stream section.
first This is the first demo record for the lob
Second line of the first record|second This is the second
demo record for the lob
Second line of the second record|third This is the third
demo record for the lob
Second line of the third record|
Loading multimedia files
This is another case of LOB loading, in this case the BLOB data type is used to store
binary data. When loading records from the same data file, there is an overhead
involved to find out the record length. Loading from a secondary data file is
more suitable for loading LOB data. When loading LOB data this way there is no
requirement that the LOB field fits in memory, the load takes place by reading from
the LOB file in 64K chunks.
When loading data from a LOB file, there are two ways to specify the LOB file; it can
be specified either statically or dynamically. In the first case, the file is specified in the
same control file. In the case of a dynamically defined LOB file, the file is specified
within the data file and it is read into a FILLER field (from the datafile) which is then
used as a parameter in the control file to specify where the LOB file is.
A FILLER field acts as a place holder; it is not read as actual data, its position is just
considered in the data file to find other field positions or, in this case, to read its
information as source of data for a dynamic 'variable' inside the same control file.
Let's first prepare the table for this demonstration:
CREATE TABLE image_table (
image_id NUMBER(5),
file_name VARCHAR2(30),
image_data BLOB
);
In the example, the load is performed by means of a dynamically specified LOB
file name.
 
Search WWH ::




Custom Search