A BLOB (Binary Large Object) is a large binary data object that is usually processed and stored by databases in a special way. Typical BLOBs are files, such as video, audio, or image files.
The abbreviation BLOB stands for Binary Large Object and describes a large file that is in binary form and should be stored in a database. It may be, for example, video, audio or image and graphics files.
Special procedures and data types are necessary for storing and processing such large files in databases. On the one hand, this is due to the size of the files and, on the other hand, to the structure of the contents of the BLOBs, which is not readable by the database systems.
BLOB (Binary Large Object)
In the Big Data environment, BLOBs are common and stored in relational or non-relational database systems. Depending on the database system, the data is stored as normal field data or stored in special BLOB areas. Some database systems do not support the storage of binary large objects. The size of BLOBs can be up to several hundred gigabytes.
Related Article: What is Big Data and BigTable
Difference between BLOB and CLOB
The generic term for Binary Large Object (BLOB) and Character Large Object (CLOB) is Large Object (LOB). BLOB and CLOB are big files, but they differ in their basic structure. While a BLOB is binary, a CLOB consists of strings. Some database systems provide functions to convert BLOBs to CLOBs or CLOBs to BLOBs.
[Related Article: Artificial Intelligence Vs Augmented Intelligence]
The Problem with Storing BLOBs in Databases
The basic problem of processing BLOBs by databases is that the data of the BLOBs are unstructured from the database view and therefore unreadable. Although BLOBs have an internal structure, they can not be captured or evaluated by the databases.
The contents and contexts themselves are therefore not usable and must be stored and interpreted as a whole. Database operations in BLOBs are limited to full reading and saving. Typical database operations, such as searching, sorting, or filtering the data, are not applicable to the contents of the BLOBs, but mostly just to filenames and file types. Only the complete file or its file name and file type can be processed by the database.
[Related Article: Big Data Phenomenon ]
Because in column-based and row-based databases, the fields in the most common database management systems are not suitable for storing BLOBs, many database systems in the database fields store only a reference to the actual location of the BLOBs.
The supported size of a BLOB depends on the type of database system or the settings made. LOB segments may be located in completely different storage areas, such as the tables of the database. This procedure prevents the large amounts of data in the BLOBs from affecting the performance of manipulating other table data.
In many database systems, different settings for buffer and cache can be set for normal table data and BLOBs. Basically, it should be noted that concurrent processing of normal table data and BLOBs in the various databases is not very efficient in terms of access and space required.
[Related Article: What is Amazon Redshift]
The Benefits of Storing BLOBS in a Database
Although storing and processing BLOBs in databases is rather inefficient, it also has some advantages. All data including the BLOBs are neatly integrated into the database schema and referenced.
Backups and dumps of the database contain all relevant data. Another advantage is that the access rights to the data are clearly regulated by the rights management of the database system.
[Related Article: Amazon Machine Learning]
The Different Data Types of Common Database Systems
The various database management systems of the different manufacturers have special LOB data types for storing BLOBs and CLOBs. For example, BLOBs are represented by the following data types:
- Database system: MySQL – BLOB data types: TINYBLOB (up to 64 kilobytes), MEDIUMBLOB (up to 16 megabytes), LONGBLOB (up to four gigabytes)
- Database system: PostgreSQL – BLOB data types: BYTEA or via OID (Object Identifier)
- Database system: Oracle – BLOB data types: BLOB
- Database system: DB2 – BLOB data types: BLOB
- Database system: Microsoft SQL Server – BLOB data types: varbinary as of SQL Server 2005, text, ntext
Related Article: [What is ACID Database]
The programming language Java has its own interface called BLOB. It allows access to the BLOBs stored in the database systems. JavaScript for Browser scripting language can generate its own BLOB objects to read, send, and manipulate binary BLOB data.