Blob and clob

Source: Internet
Author: User

Blob (Binary Large Object), a large binary object, is a container that can store binary files.

In computer systems, blob is often the field type used to store binary files in databases.

Blob is a large file. A typical blob is an image or sound file. due to their size, it must be processed in a special way (for example: upload, download, or store data in a database ).

In MySQL, blob is a type series, including tinyblob, blob, mediumblob, and longblob. The only difference between these types is that the maximum size of the stored files varies.

Four blob types in MySQL

Type size (unit: bytes)

Tinyblob Max. 255

Blob Max 65 K

Mediumblob up to 16 MB

Up to 4 GB longblob

Clob (character large object)

Ing of SQL clob in javatm programming language. SQL clob is a built-in type that stores character large object as a column value in a row of a database table. By default, the driver uses SQL Locator (clob) to implement the clob object, which means that the clob object contains a logical pointer to SQL clob data rather than the data itself. The clob object is valid during the transaction processing it creates.

In some database systems, text is also used as the clob alias, such as SQL Server.

Differences:

Blob stores data in binary format. For example, save a bitmap.

Clob uses Char to save data. For example, save the XML document.

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.