Database Reference
In-Depth Information
16.2
Complex and Object Datatypes
From my perspective, a complex datatype is any datatype not containing a
single scalar value. Thus a complex datatype can be a binary object, a refer-
ence (a pointer, not a ROWID), or a structural definition. At this stage,
complex and object datatypes are broken into multiple separate sections,
starting with straightforward binary object storage datatypes.
16.2.1
Binary Object Datatypes
Binary object datatypes are shown in Table 16.2. This table includes some
now-desupported binary object datatypes for the sake of consistency. BLOB
datatypes can be used to store multimedia objects such as images, video,
and sound files (see BFILE pointers in the next section on reference
datatypes). CLOB objects can be used to store string data values that are
too large for VARCHAR2 datatypes.
Table 16.2
Oracle Complex Binary Object Datatypes.
Datatype
Parameters
Example
BLOB
None
BLOB
Stores unstructured data in binary format, up to 4 GB.
CLOB
None
CLOB
Character data up to 4 GB. Used for high-volume text data.
NCLOB
None
NCLOB
Stores large (up to 4 GB) data in unicode or a national charac-
ter set.
LONG
None
LONG
(Desupported)
Maximum size is 2 GB. Used for text data. You should use
BLOB instead of LONG when creating new tables.
RAW(n)
n = 1 to 2,000
RAW(500)
(Desupported)
Raw binary data of variable length, up to 2,000 characters.
Use CLOB instead.
LONG RAW
None
LONG RAW
(Desupported)
Raw binary data of variable length. The maximum length is 2
GB. Use BLOB instead.
Search WWH ::




Custom Search