Storing BYTE and TEXT Data

A simple-large-object data type can store text or binary data in blobspaces or in tables. The database server can access a BYTE or TEXT value in one piece. When you specify a BYTE or TEXT data type, you can specify the location in which it is stored. You can store data with the table or in a separate blobspace.

If you are creating a named ROW data type that has a BYTE or TEXT field, you cannot use the IN clause to specify a separate storage space.

The following example shows how blobspaces and dbspaces are specified. The user creates the resume table. The data values are stored in the employ dbspace. The data in the vita column is stored with the table, but the data associated with the photo column is stored in a blobspace named photo_space.
CREATE TABLE resume
   (
   fname         CHAR(15),
   lname         CHAR(15),
   phone         CHAR(18),
   recd_date     DATETIME YEAR TO HOUR,
   contact_date  DATETIME YEAR TO HOUR,
   comments      VARCHAR(250, 100),
   vita          TEXT IN TABLE,
   photo         BYTE IN photo_space
   )
   IN employ;