Open In App

Basic operations and Working of LOB

This topic describes the usage and semantics of LOBs that you need to be familiar with to use LOBs in your application. Various techniques for working with LOBs are covered.

Here, persistent LOBs assume that you are dealing with LOBs in tables that already exist whereas the task of creating tables with LOB columns is typically performed by your database administrator.



LOB Column States
The techniques which is used while accessing a cell in a LOB column differ depending on the state of the given cell. A cell in a LOB Column can be in any one of the following states:

Locking a Row Containing a LOB



Reason for locking LOB is you can lock a row containing a LOB to prevent other database users from writing to the LOB during a transaction. While locking a row containing a LOB, specify the FOR UPDATE clause when you select the row, if the row is locked, other users cannot lock or update the LOB, until you end your transaction.

Opening and Closing LOBs
The LOB APIs include operations that enable you to explicitly open and close a LOB instance. You can easily open or close a persistent LOB instance of any these type: BLOB, CLOB, NCLOB, or BFILE. You can open a LOB to achieve one or both of the following results:

Article Tags :