A varying-length opaque data type

A varying-length opaque data type has an internal structure whose size might be different for different values of the opaque data type. Varying-length opaque types are useful for storage of multirepresentational data, such as images. For example, image sizes vary from one picture to another. You might store data up to a certain size within the opaque data type and use a smart large object in the opaque data type if the image size exceeds that size.

When you register the opaque data type in the database, you indicate that the size is varying, and you can indicate a maximum size for the internal structure. For more information, see Data type size.

A multirepresentational data type is a varying-length data type that stores data directly in the internal structure of the opaque type if the length of the data is smaller than a specified threshold. If the length of the data is greater than the threshold, the data type stores the value in a smart large object and then stores the smart large object handle in the opaque type.

When you insert a value into a multirepresentational data type, the assign() support function determines where the data should be stored. When you delete data, the destroy() support function determines whether the data should be removed from the internal structure or from a smart large object. The update() and deepcopy() functions provide more efficient management for UDTs that contain smart large objects. For more information about these functions, see Handle smart large objects. For information about how to use multirepresentational data types, refer to the HCL OneDB™ DataBlade® API Programmer's Guide.