Large Object Types

About

Large Object (LOB) types are used to store large volumes of data such as lengthy text, images, audio, video, or documents. LOBs are stored separately from regular row data, allowing efficient handling of very large data.

LOBs are divided into two broad categories:

  • Character LOBs (CLOBs) – for large text

  • Binary LOBs (BLOBs) – for binary data

1. BLOB (Binary Large Object)

  • Stores binary data such as images, audio, video, PDFs, or any other unstructured binary content.

  • Does not support character encoding.

  • Cannot be searched or manipulated directly using text operations.

Example use: Store a JPEG image file.

2. CLOB (Character Large Object)

  • Stores large amounts of character/text data.

  • Supports character encoding (like UTF-8).

  • Used when text content exceeds typical VARCHAR limits.

Example use: Store a full HTML document or a long article.

3. NCLOB (National Character Large Object)

  • Same as CLOB, but stores Unicode character data (national character set).

  • Useful for multilingual applications.

Vendor Support Overview

Database

BLOB

CLOB

NCLOB

Notes

Oracle

Yes

Yes

Yes

Full LOB and external file support

MySQL

Yes

Yes

No

Uses TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT instead of CLOB

PostgreSQL

Yes

Yes

No

Uses TEXT for large text; BYTEA as alternative to BLOB

SQL Server

Yes

Yes (VARCHAR(MAX))

No

TEXT, NTEXT, IMAGE deprecated; use VARBINARY(MAX), VARCHAR(MAX)

SQLite

Yes

Yes

No

Very flexible typing; no strict separation

Last updated

Was this helpful?