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.