Home | Previous Page | Next Page   Object-Relational Databases > Creating and Using Extended Data Types in Dynamic Server > Informix Data Types >

Extended Data Types

Extended data types let you create data types to characterize data that cannot be easily represented with the built-in data types. However, you cannot use extended data types in distributed transactions. Figure 25 shows the extended data types.

Figure 25. Extended Data Types
begin figure description - The chart is made up of rectangles representing categories of data. They are connected in a hierarchy by solid lines.  At the top of the chart is "DATA TYPES". "DATA TYPES" has two children: "Built-in data types" and "Extended data types". The "Built-in data types" rectangle has no children and contains a note to see previous figure.  "Extended data types" has two children: "Complex data types" and "User-defined data types".  "Complex data types" has two children: "Collection types" and "Row Types".  "Collection types" has three children: "LIST", "SET", and "MULTISET". None of these three has children.  "Row types" is a sibling of "Collection types" and a child of  "Complex data types", which is a child of "Extended data types", which is a child of DATA TYPES". "Row types" has two children: "Unnamed Row" and "Named Row". Neither of these has children.  "User-defined data types" is a sibling of "Complex data types" and a child of "Extended data types", which is a child of "DATA TYPES". "User-defined data types" has two children: "Distinct" and "Opaque". "Distinct" has no children. "Opaque" has one child: "DataBlade data types". "DataBlade data types" has no children. - end figure description

Complex Data Types

Complex data types describe either a collection of data objects, all of one type (LIST, SET, and MULTISET), or groups of objects of different types (named and unnamed rows.)

User-Defined Data Types

A user-defined data type is a data type that is not provided by the database server. You must provide all of the information that the database server needs to manage opaque data types or distinct data types.

Distinct Data Types

A distinct data type is an encapsulated data type that you create with the CREATE DISTINCT TYPE statement. A distinct data type has the same representation as, but is distinct from, the data type on which it is based. You can create a distinct data type from built-in types, opaque types, named row types, or other distinct types. You cannot create a distinct data type from any of the following data types:

When you create a distinct data type, you implicitly define the structure of the data type because a distinct data type inherits the structure of its source data type. You can also define functions, operators, and aggregates that operate on the distinct data type.

For information about distinct data types, see Casting Distinct Data Types, the IBM Informix: Guide to SQL Syntax, and the IBM Informix: Guide to SQL Reference.

Opaque Data Types

An opaque data type is an encapsulated data type that you create with the CREATE OPAQUE TYPE statement. When you create an opaque data type, you must explicitly define the structure of the data type as well as the functions, operators, and aggregates that operate on the opaque data type. You can use an opaque data type to define columns and program variables in the same way that you use built-in types.

For information about creating opaque data types, see IBM Informix: User-Defined Routines and Data Types Developer's Guide and the IBM Informix: Guide to SQL Syntax.

DataBlade Data Types

The diagram in Figure 25 includes DataBlade data types although they are not actually data types. A DataBlade is a suite of user-defined data types and user-defined routines that provides tools for a specialized application. For example, different DataBlades provide tools for managing images, time-series, and astronomical observations. Such applications often require opaque data types as well as other user-defined data types. For information about developing a DataBlade, refer to the IBM Informix: DataBlade API Programmer's Guide and the DataBlade Developers Kit. For information about the DataBlades that IBM provides, contact your customer representative.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]