CLOB和BLOB与DB2和Oracle的区别?

时间:2022-11-24 13:26:04

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

我对这两种数据类型非常着迷。根据Oracle Docs,它们如下所示:

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.

BLOB:长度可变的二进制大对象字符串,最长可达2GB(2147,483,647)。主要用于保存非传统数据,如语音或混合媒体。BLOB字符串不与字符集相关联,就像位数据字符串一样。

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.

CLOB:可变长度字符的大型对象字符串,最长可达2GB(2147,483,647)。CLOB可以存储单字节字符字符串或基于字符的多字节数据。CLOB被认为是字符串。

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 ?

我不知道的是,从DB2和Oracle的角度来看,两者之间是否存在差异?我的意思是,DB2 CLOB和Oracle CLOB之间,以及DB2 BLOB和Oracle BLOB之间的区别是什么?DB2和Oracle中的最大大小是多少?仅仅是2 GB吗?

3 个解决方案

#1


31  

They can be considered as equivalent. The limits in size are the same:

它们可以被认为是等价的。大小的限制是相同的:

  • Maximum length of CLOB (in bytes or OCTETS)) 2 147 483 647
  • CLOB的最大长度(以字节或字节为单位))2 147 483 647。
  • Maximum length of BLOB (in bytes) 2 147 483 647
  • BLOB的最大长度(以字节为单位)2 147 483 647

There is also the DBCLOBs, for double byte characters.

还有dbclob,用于双字节字符。

References:

引用:

#2


43  

BLOB primarily intended to hold non-traditional data, such as images,videos,voice or mixed media. CLOB intended to retain character-based data.

BLOB主要用于存储非传统数据,如图像、视频、语音或混合媒体。CLOB旨在保留基于字符的数据。

#3


23  

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

BLOB是二进制数据(视频、图像、文档等)

CLOB is for large text data (text)

CLOB表示大文本数据(文本)

Maximum size on MySQL 2GB

最大尺寸的MySQL 2GB。

Maximum size on Oracle 128TB

Oracle 128TB上的最大大小

#1


31  

They can be considered as equivalent. The limits in size are the same:

它们可以被认为是等价的。大小的限制是相同的:

  • Maximum length of CLOB (in bytes or OCTETS)) 2 147 483 647
  • CLOB的最大长度(以字节或字节为单位))2 147 483 647。
  • Maximum length of BLOB (in bytes) 2 147 483 647
  • BLOB的最大长度(以字节为单位)2 147 483 647

There is also the DBCLOBs, for double byte characters.

还有dbclob,用于双字节字符。

References:

引用:

#2


43  

BLOB primarily intended to hold non-traditional data, such as images,videos,voice or mixed media. CLOB intended to retain character-based data.

BLOB主要用于存储非传统数据,如图像、视频、语音或混合媒体。CLOB旨在保留基于字符的数据。

#3


23  

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

BLOB是二进制数据(视频、图像、文档等)

CLOB is for large text data (text)

CLOB表示大文本数据(文本)

Maximum size on MySQL 2GB

最大尺寸的MySQL 2GB。

Maximum size on Oracle 128TB

Oracle 128TB上的最大大小