You can access the Oracle large object datatypes: binary
large objects (BLOBs), character large objects (CLOBs), and binary files
(BFILEs).
On an Oracle Database Server, these datatypes can store
objects of up to 4 gigabytes in size. They are similar in purpose to the
familiar Oracle7 LONG and LONG RAW datatypes, but offer a number of additional
advantages.
Comparison of LOBs with LONGs
LOBs
LONGs
·
Up
to 4 gigabytes Up
to 2 gigabytes
·
Multiple
LOB columns allowed in a single table Only
one LONG column allowed per table
·
Replication
supported No
replication
·
Random
data access supported Only
sequential access supported
·
Better
table space management
(only LOB locator is stored) Less efficient
(data is stored directly in table)
·
Allowed
in user-defined object types Not
allowed
·
Easily
passed to procedures and external calls Not
easily passed
LOBs
in detail:
BLOBs are used to store large objects in binary format.
CLOBs are used to store character data. These two types are also known as
internal LOBs, because their data is stored within the server. The data
participates in transactions and integrity control, including commits and
rollbacks.
BFILEs, in contrast, are stored outside of the server.
The server stores only the operating system address of the file. As a
consequence, BFILEs cannot participate in database transactions.
Compatibility
Because of the various advantages offered by LOBs (see
the table above), you should use LOBs instead of LONGs in any new application.
However, for backward compatibility, LONGs are still fully supported.
Forms Types Within a form, the LOB would usually be given
a control type of Text or Image, depending on its nature and usage.
Restrictions
·
BFILEs are read-only.
·
Although Forms will attempt to load the
entire BFILE or BLOB when it is read at runtime, it is limited by the amount of
runtime virtual memory available
·
For CLOBs, Forms has a size limitation of
65534 bytes.