What is the use of BLOB datatype in MySQL?

What is the use of BLOB datatype in MySQL?

A Binary Large Object ( BLOB ) is a MySQL data type that can store binary data such as images, multimedia, and PDF files.

How does a BLOB file work?

The Blob object represents a blob, which is a file-like object of immutable, raw data; they can be read as text or binary data, or converted into a ReadableStream so its methods can be used for processing the data. Blobs can represent data that isn’t necessarily in a JavaScript-native format.

What is true about MySQL BLOB and TEXT types?

BLOB is used for storing binary data while Text is used to store large string. BLOB values are treated as binary strings (byte strings). They have no character set, and sorting and comparison are based on the numeric values of the bytes in column values. TEXT values are treated as nonbinary strings (character strings).

How blob is used in database?

USAGE OF BLOB : You can write a binary large object ( BLOB ) to a database as either binary or character data, depending on the type of field at your data source. To write a BLOB value to your database, issue the appropriate INSERT or UPDATE statement and pass the BLOB value as an input parameter.

What is BLOB data type in MySQL?

BLOB Data Type in MySQL. A BLOB is a binary large object that can hold a variable amount of data. There are four types of BLOB provided below: TIMYBLOB. BLOB. MEDIUMBLOB. LONGBLOB.

What is longblob in MySQL?

The effective maximum length of LONGBLOB columns depends on the configured maximum packet size in the client/server protocol and available memory. Each LONGBLOB value is stored using a four-byte length prefix that indicates the number of bytes in the value.

What is blob JS?

A Blob object represents a file-like object of immutable, raw data. Blobs represent data that isn’t necessarily in a JavaScript-native format.

What is a SQL blob?

An SQL BLOB is a built-in type that stores a Binary Large Object as a column value in a row of a database table. By default drivers implement Blob using an SQL locator(BLOB), which means that a Blob object contains a logical pointer to the SQL BLOB data rather than the data itself.