Object storage tables

The object storage tables provide DASD storage for objects. Objects are stored in the 4 KB or 32 KB table or LOB storage structure, depending on size and whether or not LOB support is enabled. If an object is 3980 bytes or smaller, it is stored in the 4 KB table. If the object is larger than 3980 bytes but smaller or equal to 32640 bytes, it is stored in the 32 KB table. If the object is larger than 32640 bytes, but less than or equal to 256M and LOB support is disabled, then it is stored in multiple rows in the 32 KB table. If the object is larger than 32640 bytes and LOB support is enabled, then it is stored in a LOB storage structure. Note that objects greater than 256M can only be stored in a LOB storage structure. Refer to 5 Changing system libraries for more information on LOB support.

Objects stored in the 32 KB table might be broken into segments and stored as rows. Each row in the 32 KB table can contain up to 32␠640 bytes of object data.

Table 1 shows the contents of an entry in a 4 KB or 32 KB object storage table.

Each object storage table has one index. The 4 KB table index is the concatenation of the collection name ID and object name in ascending-order sequence. The 32 KB table index is the concatenation of the collection name ID, object name and segment number in ascending-order sequence. When objects are retrieved, they are ordered by object segment number.

Table 1. Object storage table
Column description Column name DB2 field type and data size Indexes where used
Data Format Version OTVER CHAR (1)  
Segment Number OTSEG SMALLINT Index 1
Collection Name Identifier OTCLID INTEGER Index 1
Object Name OTNAME VARCHAR (44) Index 1
Object Data Segment OTOBJ LONG VARCHAR  
Note:
  1. All columns are created with the NOT NULL attribute.
  2. The object table columns are the same for the 4 KB and 32 KB tables.
  3. Segment number is not used in the 4 KB table.
  4. The index on each table is a unique cluster index.
  5. Maximum sizes of object table entries:
    •  4 KB table is 3␠980
    • 32 KB table is 32␠640
Figure 1. LOB Storage Structure
LOB Storage Structure

Table 2 shows the contents of an entry in a LOB storage table.

Table 2. LOB storage table
Column description Column name DB2 field type and data size Indexes where used
Data Format Version OTVER CHAR (1)  
Segment Number OTSEG SMALLINT  
Collection Name Identifier OTCLID INTEGER Index 1
Object Name OTNAME VARCHAR (44) Index 1
Row ID OTROWID ROWID  
Object Data Segment OTOBJ BLOB(2G)  
Note:
  1. All columns are created with the NOT NULL attribute.
  2. The index on each table is a unique cluster index.
  3. Maximum sizes of object table entries are 2000M (2,097,152,000 bytes).
  4. The LOB auxiliary table is managed exclusively by DB2 and is transparent to OAM.
  5. Columns OTVER and OTSEG are reserved for future use.