Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between CLOB and BLOB from DB2 and Oracle Perspective?

I have been pretty much fascinated by these two data types. According to Oracle Docs, they are presented as follows :

BLOB : Variable-length binary large object string that can be up to 2GB (2,147,483,647) long. Primarily intended to hold non-traditional data, such as voice or mixed media. BLOB strings are not associated with a character set, as with FOR BIT DATA strings.

CLOB : Variable-length character large object string that can be up to 2GB (2,147,483,647) long. A CLOB can store single-byte character strings or multibyte, character-based data. A CLOB is considered a character string.

What I don't know, is whether there is any difference between the two from DB2 and Oracle perspective? I mean, what are the differences between DB2 CLOB and Oracle CLOB, also between DB2 BLOB and Oracle BLOB? What is the maximum size of both in DB2 and Oracle? Is it just 2 GB ?

like image 581
The Dark Knight Avatar asked Feb 05 '14 07:02

The Dark Knight


People also ask

How is CLOB data stored in Db2?

You can use Db2 to store LOB data, but this data is stored differently than other kinds of data. Although a table can have a LOB column, the actual LOB data is stored in a another table, which called the auxiliary table. This auxiliary table exists in a separate table space called a LOB table space.

What is CLOB datatype in Oracle?

A CLOB (character large object) value can be up to 2,147,483,647 characters long. A CLOB is used to store unicode character-based data, such as large documents in any character set.

What is BLOB datatype in Oracle?

A BLOB (binary large object) is a varying-length binary string that can be up to 2,147,483,647 characters long. Like other binary types, BLOB strings are not associated with a code page. In addition, BLOB strings do not hold character data.


1 Answers

BLOB is for binary data (videos, images, documents, other)

CLOB is for large text data (text)

Maximum size on MySQL 2GB

Maximum size on Oracle 128TB

like image 80
scientific Avatar answered Sep 26 '22 15:09

scientific