Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the type that mysql uses to store pictures?

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "what is the type of mysql used to store pictures". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the type of mysql used to store pictures".

In mysql, BLOB type is used to store pictures; BLOB type is a special binary type, which can store a large amount of binary data, including pictures, videos, etc., this type includes TinyBlob, Blob, MediumBlob and LongBlob. The only difference is the size of the storage.

The operating environment of this tutorial: windows10 system, mysql8.0.22 version, Dell G3 computer.

What type does mysql use to store pictures?

The BLOB type is a special binary type. BLOB can store a large amount of binary data, such as pictures, videos and so on.

BLOB types include TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB. The only difference between them is the maximum length.

BLOB introduction

BLOB (binary large object), a binary large object, is a container that can store binaries. In computers, BLOB is often the type of field used to store binary files in a database. BLOB is a large file, and a typical BLOB is a picture or a sound file, which must be processed in a special way because of their size (such as uploading, downloading, or storing to a database).

According to Eric Raymond, the main idea of dealing with BLOB is to let the file processor, such as the database manager, ignore what the file is, but care about how to deal with it. However, some experts stressed that this method of dealing with big data objects is a double-edged sword, and it may cause some problems, such as the excessive size of the stored binaries, which will degrade the performance of the database. Storing large multimedia objects in a database is a typical example of an application dealing with BLOB.

Mysql BLOB Typ

In MySQL, BLOB is a family of types, including TinyBlob, Blob, MediumBlob, and LongBlob. The only difference between these types is in the maximum size of the storage file.

Four BLOB types of MySQL

Type size (in bytes)

TinyBlob maximum 255i

Maximum of 65K for Blob

MediumBlob up to 16m

LongBlob maximum 4G

Thank you for your reading, the above is the content of "what is the type of mysql used to store pictures?" after the study of this article, I believe you have a deeper understanding of what the type of mysql used to store pictures is, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report