System Architecture 2-145

Blob Storage and the Blob Descriptor

Blob Storage and the Blob Descriptor
Datarows that include blob data do not include the blob data in the row itself.
Instead, the data row contains a 56-byte blob descriptor that includes a
forward pointer (rowid) to the location where the first segment of blob data
is stored. The descriptor can point to a blob page (if the blob is stored in a
dbspace) or a blobpage (if the blob is stored in a blobspace).
Following is the structure of the 56-byte blob descriptor:
typedef struct tblob
{
short tb_fd; /* blob file descriptor (must be first) */
short tb_coloff; /* Blob column offset in row */
long tb_tblspace; /* blob table space*/
long tb_start; /* starting byte*/
long tb_end; /* ending byte: 0 for end of blob */
long tb_size; /* Size of blob */
long tb_addr; /* Starting Sector or BlobPage */
long tb_family; /* Family Number (optical support)*/
long tb_volume; /* Family Volume */
short tb_medium; /* Medium - one if optical */
short tb_bstamp; /* first BlobPage Blob stamp */
short tb_sockid; /* socket id of remote blob*/
short tb_flags; /* flags */
long tb_sysid; /* optical system identifier*/
long tb_reserved2; /* reserved for the future*/
long tb_reserved3; /* reserved for the future*/
long tb_reserved4; /* reserved for the future*/
} tblob_t;
Whena row containing blob data is to be inserted, the blobs are created first.
After the blobs are written to disk, the row is updated with the blob
descriptor and inserted.
0110 Blob page, room for partial-page segments
1010 Blob page, room for small segments
1110 Blob page, no room for even small segments
Bit Values Description of Page Fullness
(2 of 2)