Large object (LOB) types are used to store TEXT, binary large object (BLOB), JavaScript Object Notation (JSON), and GEOMETRY data. LOB data can be stored in INROW or OUTROW storage mode.
INROW storage
When INROW storage is used, LOB data is stored together with rows in the primary table. Only one access to storage is required to read LOB data.
OUTROW storage
When OUTROW storage is used, LOB data is stored in an LOB auxiliary table. To read LOB data, the database first obtains locators of the data by reading rows in the primary table and then reads actual LOB data from the LOB auxiliary table based on the locators. The whole process involves two accesses to the storage.
LOB types
The common LOB types in Oracle mode are described as follows:
- BLOB: stores large files such as images, files, and audios.
- CLOB: stores single-byte and multi-byte character data.
- JSON: stores data in the JSON format. It is commonly used to process structured data.
- SDO_GEOMETRY: stores and processes geometric data. It is a composite data type used to represent a two-dimensional or three-dimensional geometric figure.
- XMLType: stores data in the XML format. It can facilitate the processing and query of XML files.
Note
XMLType differs from conventional LOB types in some aspects. It is actually a user-defined type (UDT) that contains a BLOB field.