Comparison of large objects in Oralce7 and Oralce8

Source: Internet
Author: User

Compared with large objects in Oralce7 and Oralce8, Oralce7 has two basic long types, large objects, long characters and long raw binary. It uses the related internal storage methods, it can store up to 2 GB of related data and can only be accessed in sequence). Each table can only store one column and select returns the actual data.

After Oralce8: there are long, long raw, clob, blob, nclob, bfile types. the long and long raw types are the same as Oralce 7, and the lob type can store data up to 4 GB, that is, they can be stored inside the table or outside the table, each table can store more than one column of lob. Whether stored internally or externally, the select statement returns a pointer to Data. here: long and long raw are the types to be discarded by Oralce.

Lob

After Oralce8: oralce has four types of lob: clob, blob, nclob, and bfile.

Clob: large internal character object;

Blob: large internal binary object;

Nclob: an object with a fixed length of multiple bytes;

Bfile: an external Binary large file. The data in this file can only be read-only and not included in the database.

Bfile is a direct inheritance of the early rdbms blob. It is stored inside the database as a database pointer and points to an external operating system file.

Lob consists of two parts: Data and pointing. The Data Pointer. the lob column does not contain values, only the positioning pointer. But the values are stored together with the table.

Dbms_lob

There are multiple methods to operate lob data in Oralce, but the most commonly used is the dbms_lob package. It mainly provides the following processes for users to maintain internal lob fields:

APPEND) Add the content in the source LOB to the target LOB.

COPY) COPY data from the source LOB to the target LOB.

ERASE) delete all or part of LOB content

TRIM) to reduce the LOB value to the specified length

WRITE) WRITE data to LOB

COMPARE) checks whether the partial or all values of two lobs of the same data type are the same

GETLENGTH) Get the length of the LOB

READ) READ data from LOB

The above content is a comparison of the large objects in Oralce7 and Oralce8. I hope you will get some benefits.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.