BLOB is a generic term describing any arbitrarily sized block of data. This data type can also be referred to as image, binary or bitdata. A BLOB can be created using one of four syntaxes -- all of which are functionally equivalent. Various syntaxes are provided for compatibility with industry standards and different vendors. The available BLOB data type syntaxes are:
where n is the size of the block used for storage. The x parameter for the binary, varbinary and long varbinary syntaxes is not currently used. The minimum size of a BLOB data type is zero bytes. BLOB data types do not have NULLs. Since BLOB fields can not be used in WHERE clauses or aggregate functions, there is no need for NULLs. However, any BLOB can have a length of zero, which can only be determined by using an API call from a host application.
The BLOB data type allows you to save and manage binary disk files, such as image and sound files. Unlike char, int, and decimal, which have defined purposes and semantics, BLOB data is considered to be "unstructured" and "anonymous" and is not interpreted in any way by the database. Apart from certain limitations, BLOB fields can be accessed and manipulated like any other column in a table.
Tables can have more than one BLOB field; and tables with BLOB fields can be joined in any fashion. There is no maximum size for a BLOB data type. Data stored as a BLOB data type is not stored in the XDB Server table (.TAB) file as other data types are. Instead, each BLOB field is stored as a separate file in the same storage group as the XDB Server table file. Each BLOB file name has the same root file name as the .TAB file.
Each BLOB field in a table is stored in a separate file. The files are partitioned into blocks, and each BLOB record is stored as a linked-list of blocks. The default block size is 2K, and can be set (using the BLOCK SIZE clause) to any value between 64 bytes and 32K during table creation. A free list of blocks is maintained and blocks are reused.
BLOB data types are not supported with the DOS single-user engine.