Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask PL-SQL Expert

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;

PL-SQL, Programming

  • Category:- PL-SQL
  • Reference No.:- M9509898

Have any Question?


Related Questions in PL-SQL

For this assignment you will be provided a database backup

For this assignment, you will be provided a database backup for a database called FinanceDB. You will have to restore this backup to your own version of SQL Server. All of the questions in this assignment relate to the F ...

Assignment - queries functions and triggersaimthe aims of

Assignment - Queries, Functions and Triggers Aim The aims of this assignment are to: formulate SQL queries; populate an RDBMS with a real dataset, and analyse the data; design test data for testing SQL queries; create SQ ...

Purpose of the assessment with ulo mapping the purpose of

Purpose of the assessment (with ULO Mapping) The purpose of this assignment is to develop skills in managing data in databases and to gain understanding of data model development and implementation using a commercially a ...

Continuing the project you have worked on in weeks 1-4 in

Continuing the project you have worked on in Weeks 1-4, in this final week, complete the following tasks: Refine your database and SQL statements by incorporating your instructor's feedback. Verify that the database comp ...

Complete the following tasksin microsoft access create the

Complete the following tasks: In Microsoft Access, create the database and tables that you identified in W3 Assignment 2. In Microsoft Word, write the SQL statements to create the database and tables. Write SQL statement ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As