Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

A binary large object (BLOB) is a database data type for storing variable-length binary data as bytes, without interpreting those bytes as ordinary character text. Images, audio and video are common examples of content stored this way, but a BLOB is not itself a file format. The type name, size limits and storage behavior depend on the database.

What does BLOB mean?

BLOB stands for binary large object. MySQL defines a BLOB as “a binary large object that can hold a variable amount of data.” In practical terms, it stores a sequence of bytes whose meaning is determined by the application or file format, rather than by a text character set. MySQL Reference Manual, version 26.7

A BLOB might contain the bytes of a JPEG image, an audio recording, a video, or another binary file. The database stores the bytes; it does not automatically validate that they form a valid image or video, or decide how an application should display or process them.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How is a BLOB different from text?

Binary data and text are handled differently. A BLOB is treated as bytes without character-set semantics. In MySQL, BLOB strings are binary, while TEXT strings are nonbinary character strings interpreted using a character set. MySQL Reference Manual, version 26.7

BLOB and CLOB are therefore not interchangeable: a BLOB holds binary data, while a CLOB holds character data. Oracle likewise describes BLOBs as bitstreams without character-set semantics and distinguishes them from character large-object types. Oracle Database 26 SQL Reference Oracle Database SecureFiles and Large Objects Developer’s Guide, 21c

Does every database use a BLOB type?

No. The concept is broadly useful, but database products use different names and storage mechanisms. The word “large” does not establish one universal size limit or imply that every database has a type literally named BLOB.

Database or documentation scope Binary storage approach Important distinction
MySQL Reference Manual, version 26.7 TINYBLOB, BLOB, MEDIUMBLOB and LONGBLOB The four types have different maximum lengths; the name BLOB alone does not specify which limit applies. MySQL documentation
Oracle Database 26 BLOB The documented maximum depends on the LOB storage CHUNK parameter and database block size; it is not a universal BLOB limit. Oracle documentation
PostgreSQL 17 bytea column type or Large Objects bytea stores binary data in a column; Large Objects use a separate mechanism referenced by an OID. PostgreSQL does not use the SQL-standard BLOB name for these documented binary types. PostgreSQL documentation
SQL Server 2008 R2 and SQL Server 2012, as covered by Microsoft’s standards-variance page varbinary Microsoft documents varbinary as equivalent functionality in that version-scoped discussion. This source does not establish a claim about every SQL Server release. Microsoft Learn

How does database storage affect BLOBs?

Some binary values are stored in a regular column; other systems offer a separate large-object facility. That difference affects more than syntax: it can change how data is accessed, controlled, backed up and cleaned up.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

PostgreSQL: bytea and Large Objects

PostgreSQL’s bytea type stores binary data in a column. Its Large Object facility stores data separately and references it using an OID. The pgJDBC documentation says Large Objects can suit very large values, but applications must manage their lifecycle deliberately. PostgreSQL 17 documentation pgJDBC documentation

Rank #3
  • Deleting a row that contains a Large Object reference does not, by itself, delete the referenced Large Object; the application must arrange cleanup.
  • Large Object permissions do not necessarily follow access permissions for the row that references the object. Applications need to account for that distinction when designing access control.

Oracle: product-specific storage and transaction behavior

Oracle’s Database 26 SQL Reference describes BLOBs as unstructured binary large objects and documents their maximum size in relation to the LOB storage CHUNK and database block size. Oracle’s data-type documentation also describes transactional support for LOB data. Those characteristics apply to Oracle’s implementation, not to every database’s BLOB-like type. Oracle Database 26 SQL Reference

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What should you check before choosing a BLOB-like type?

Use the database product’s documentation for the specific release in use. Compare the implementation details that affect your application, rather than relying on the word BLOB alone.

  • Type name: Check whether the database supports a literal BLOB type or uses another type or facility.
  • Maximum value size: Confirm the limit and any configuration that affects it.
  • Storage model: Find out whether the bytes live in a column or in a separate large-object mechanism.
  • Access and lifecycle: Check permissions, deletion behavior and cleanup responsibilities.
  • Operations: Review the product-specific behavior for reading, writing, transactions and backups.

There is no universal rule that binary files should always be stored inside a database or always kept outside it. The appropriate choice depends on the workload and on the database’s storage, access-control and lifecycle behavior.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.