BLOB 和 CLOB 的解释

发布于 2024-12-06 19:03:58 字数 54 浏览 1 评论 0 原文

我正在寻找 BLOB 和 CLOB 数据的真正好的解释。我正在寻找用简单的英语解释的伟大内容。

I am looking for a real good explanation of a BLOB and CLOB data. I am looking for the great of that explains in plain English.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

酷炫老祖宗 2024-12-13 19:03:59

BLOB(Binary Large OBject)存储二进制文件:图片、文本、音频文件、word文档等任何肉眼无法阅读的东西。您无法通过 SQL*Plus 选择它们。

CLOB(字符大对象)存储字符数据。它们通常用于存储 XML 文档、JSON 或大块格式化或未格式化的文本。

BLOB's (Binary Large OBject) store binary files: pictures, text, audio files, word documents, etc. Anything you can't read with the human eye. You can't select them via SQL*Plus.

CLOB's (Character Large OBjects) store character data. They are often used to store XML docs, JSON's or just large blocks of formatted or unformatted text.

胡渣熟男 2024-12-13 19:03:59

这非常简单。区别在于,您将表中的大型数据对象存储为基于字符(即 CLOB)或基于二进制(即 BLOB)的列,以与如何打开文本文件和打开文件相同的方式思考它当您将其作为二进制数据打开时。

对于相对较短且在我看来是单一数据的字符串数据类型,VARCHARS 等仍然是首选。例如,名称、街道名称、部门名称等。当您希望按照 XML 配置文件等方式存储某些内容时,您可能需要考虑将其存储为 CLOB。如果您要存储图像,那么 BLOB 将是合理的选择。有人讨论在表中存储实际图像或配置文件与存储实际文件的路径是否更好,但我将把它留给另一个问题。

It's pretty straight forward. The difference is that your storing large data objects within the table as a column that are either character based (i.e. A CLOB) or binary based (i.e. a BLOB) Think of it in the same terms of how you would open a file as text vs when you open it as binary data.

VARCHARS etc. would still be preferred for string data types that are relatively short and in my mind a singular piece of data. For example a name, a street name, dept name etc. When you're looking to store something along the lines of a XML configuration file or the like, you would want to consider storing it as a CLOB. If you're storing say images, then a BLOB would be the logical choice. There are discussions about whether it's better to store the actual image or config file within the table vs storing a path to the actual file instead but I'll leave that for another question.

扬花落满肩 2024-12-13 19:03:59

BLOB 是一个二进制大对象,可以容纳您想要的任何内容,包括图像和媒体文件。任何存储为二进制文件的内容。

CLOB 是一个字符大对象,它将保存字符(文本),基本上这使它成为一个巨大的字符串字段。 CLOB 还支持字符编码,这意味着它不仅仅是 ascii 字符。

Oracle 常见问题解答的两个链接将提供每个链接的具体使用信息。

A BLOB is a Binary Large Object which can hold anything you want including images and media files. Anything stored as a binary file.

A CLOB is a Charactor Large Object, which will hold charactors (text), Basically this makes it a huge string field. CLOB also supports charactor encoding meaning it is not just ascii charactors.

The two links to Oracle's FAQ will provide specific information for the usage of each.

自由如风 2024-12-13 19:03:59

Oracle 概念指南 是以下内容的最佳来源: LOB 数据类型。确保您每年至少阅读一次概念指南以及特定于您所拥有的 Oracle 版本的概念指南。每次我读它我都会学到新东西。

Select * from v$version

The Oracle Concepts Guide is the best source for an explanation of LOB datatypes. make sure you read the concepts guide at least once a year and the concept guide specific to the version of oracle you have. Every time I read it I learn something new.

Select * from v$version
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文