Lob types in pl/sql, PL-SQL Programming

Assignment Help:

LOB Types

The large object (LOB) datatypes like BFILE, BLOB, CLOB, and NCLOB store the blocks of unstructured data (like graphic images, text, video clips, and sound waveforms) of up to four gigabytes in size. And, they allow random, efficient, piece-wise access to the data.

The LOB types are differing from the LONG and LONG RAW types in many ways. For example, the LOBs (except NCLOB) can be the attributes of an object type, but LONGs cannot. The maximum size of a LOB is 4 gigabytes, but the maximum size of a LONG is 2 gigabytes. The LOBs also support random access to data, but LONGs support only the sequential access.

BFILE

You use the BFILE datatype to store the large binary objects in an operating system files outside the database. Every BFILE variable stores a file locator that points to a large binary file on the server. The locator involves a directory alias that specifies a full path name.

The BFILEs are read-only. You cannot modify or change them. The size of a BFILE is system dependent but cannot exceed 4 gigabytes (2**32 - 1 bytes). Your DBA makes sure that a given BFILE exists and that Oracle has read permissions on it. The underlying operating system maintains the file integrity.

The BFILEs do not participate in transactions, are not recoverable, and cannot be simulated. The highest number of open BFILEs is set by the Oracle initialization parameter SESSION_MAX_OPEN_FILES, that is system dependent.

BLOB

You use the BLOB datatype to store the large binary objects in the database in-line or out-of-line. Each BLOB variable stores a locator, thatpoints to a large binary object. The size of a BLOB cannot exceed 4 gigabytes. The BLOBs participate fully in transactions, and are recoverable, and can replicate. The Changes made by package DBMS_LOB or the OCI can be committed or rolled back. Though, the BLOB locators cannot span transactions or sessions.

CLOB

You use the CLOB datatype to store the large blocks of single-byte character data in the database, in-line or out-of-line. Both the fixed-width and variable-width character sets are supported. Each CLOB variable stores a locator that points to a large block of character data. The size of a CLOB cannot exceed 4 gigabytes. The CLOBs participate fully in transactions, and are recoverable, and can be replicated. The Changes made by package DBMS_LOB or the OCI can be committed or rolled back. Though, the CLOB locators cannot span transactions or sessions.

Other Types

The following types permit you to store and manipulate the logical values and date/time values.

BOOLEAN

You use the BOOLEAN datatype to store the logical values like TRUE, FALSE, & NULL. The BOOLEAN datatype takes no parameters. Only the values TRUE, FALSE, & NULL can be assigned to a BOOLEAN variable. You cannot insert the values like TRUE & FALSE into a database column. You cannot also select or fetch the column values into a BOOLEAN variable.

DATE

You use the DATE datatype to store the fixed-length date/time values. The DATE values involve the time of day in seconds since the midnight. The date portion defaults to the first day of the present month; the time portion defaults to midnight. The date function SYSDATE returns the present date and time.

For illustration, the following statement returns the number of days since an employee was hired:

SELECT SYSDATE - hiredate INTO days_worked FROM emp WHERE empno = 7499;


Related Discussions:- Lob types in pl/sql

Perform exception handling with user-defined errors, On occasion, some of B...

On occasion, some of Brewbean's customers mistakenly leave an item out of a basket already checked out, so they create a new basket containing the missing items. However, they requ

Aggregate assignment-declarations in sql, Aggregate Assignment The %ROWT...

Aggregate Assignment The %ROWTYPE declaration cannot include an initialization clause. Though, there are two ways to assign values to all fields in a record at once. At First, t

Declaring subprograms, Declaring Subprograms   You can declare subprog...

Declaring Subprograms   You can declare subprograms in any PL/SQL subprogram, block, or package. But, you should declare subprograms at the end of the declarative part after a

Using operator ref - manipulating objects pl sql, Using Operator REF: ...

Using Operator REF: You can retrieve refs by using the operator REF that, like VALUE, takes as its argument a correlation variable. In the illustration below, you retrieve one

Packaging cursors, Packaging Cursors   You can split a cursor specific...

Packaging Cursors   You can split a cursor specification from its body for placement in a package. In that way, you can change the cursor body without changing the cursor spec

Subprograms, What Are Subprograms? The Subprograms are named PL/SQL blo...

What Are Subprograms? The Subprograms are named PL/SQL blocks which can take parameters and be invoked. The PL/SQL has 2 types of subprograms known as the procedure s and func

Use the returning clause -improve performance of application, Use the RETUR...

Use the RETURNING Clause Frequently, the application requires information about the row affected by a SQL operation, for illustration, to produce a report or take a subsequent

Commit statement in pl sql, COMMIT Statement The COMMIT statement expli...

COMMIT Statement The COMMIT statement explicitly makes everlasting changes to the database during the present transaction. The Changes made to the database are not considered e

Sql, If two relations R and S are joined, then the non matching tuples of b...

If two relations R and S are joined, then the non matching tuples of both R and S are ignored in __________________.

Example of table literal - sql, Example of Table Literal - SQL Exampl...

Example of Table Literal - SQL Example: A Table Literal (correct version) VALUES ('S1', 'C1', 'Anne'), ('S1', 'C2', 'Anne'), ('S2', 'C1', 'Boris'), ('S3', 'C3'

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd