Complex data types

A complex data type can store one or more values of other built-in or extended data types.

Complex Data Types of HCL OneDB shows the complex types that HCL OneDB™ supports.
Figure 1: Complex Data Types of HCL OneDB

Labelled rectangles depict the logical hierarchy of Complex data types. The COLLECTION types include LIST, MULTISET, and SET data types. The ROW types include Named ROW and Unnamed ROW data types. End figure description

The following table summarizes the structure of the complex data types.
Table 1. Collection types are complex data types that are made up of elements, each of which is of the same data type.
Collection types Description
LIST A group of ordered elements, each of which need not be unique within the group.
MULTISET A group of elements, each of which need not be unique. The order of the elements is ignored.
SET A group of elements, each of which is unique. The order of the elements is ignored.
Table 2. ROW types are complex data types that are made up of fields.
ROW types Description
Named ROW type Row types that are identified by their name.
Unnamed ROW type Row types that are identified by their structure.

Complex data types can be nested. For example, you can construct a ROW type whose fields include one or more sets, multisets, ROW types, and lists. Likewise, a collection type can have elements whose data type is a ROW type or a collection type.

Complex types that include opaque types inherit the following support functions.
  • input
  • output
  • send
  • recv
  • import
  • export
  • import_binary
  • export_binary
  • assign
  • destroy
  • LO_handles
  • hash
  • lessthan
  • equal
  • lessthan (for ROW types only)

The topics that follow summarize the complex data types. For more information, see the HCL OneDB Database Design and Implementation Guide.