Large Objects   «Prev  Next»

Lesson 2 Review of LOB types
ObjectiveDescribe the different types of LOB data types.

Oracle LOB data types

Oracle provides you with several different data types for storing large amounts of unstructured data. Each of these LOB data types can store up to 4 GB of data. Each of the LOB data types has a slightly different set of characteristics.

Types of LOBs

The different types of LOBs and their characteristics are described in the following table, along with a simple description of the way each of them is typically used. All LOBs can participate in transactions.
Data typeCharacteristicsUsage
BLOBCan store any type of unstructured dataMost frequently used with noncharacter data, such as images or video.
CLOBChanges can be made to the value of a CLOB through the DBMS_LOB built-in package, such as comparing the value of two LOBs orreading and writing selectively to a LOB column.Used to store large amounts of single-byte text.
NCLOBChanges can be made to the value of a CLOB through the DBMS_LOB built-in package, such as comparing the value of two LOBs orreading and writing selectively to a LOB column.Used to store large amounts of double-byte and varying-width text, such as character-based languages like Japanese and Chinese.

Ad  Oracle 12c Performance Tuning

Available Datatypes

LOB Datatype Description
BLOB Binary LOB. Binary data stored in the database.
CLOB Character LOB. Character data stored in the database.
BFILE Binary File. Read-only binary data stored outside the database, the length of which is limited by the operating system.
NCLOB A CLOB column that supports a multibyte character set.

You can create multiple LOBs per table. For example, suppose you want to create a PROPOSAL table to track formal proposals you submit. Your proposal records may consist of a series of word processing files and spreadsheets used to document and price the proposed work. The PROPOSAL table will contain VARCHAR2 datatypes (for columns such as the name of the proposal recipient) plus LOB datatypes (containing the word processing and spreadsheet files).
In the next lesson, you will learn how to choose a storage location for the data stored in LOB data types.