Home | Previous Page | Next Page   Using Existing Dynamic Server Features > Informix RDBMS Features >

Data Types

Every column in a table is assigned a data type. The data type precisely defines the values that you can store in that column. Dynamic Server supports the data types that Figure 1 shows.

Figure 1. Overview of Supported Data Types
begin figure description - This figure is described in the surrounding text. - end figure description

For a description of the data types and data type conversions, see the IBM Informix Guide to SQL: Reference. For information about how to choose data types for your relational or object-relational database, see the IBM Informix Database Design and Implementation Guide. For information on how to extend existing data types, create new casts, and define new data types for a database, see IBM Informix User-Defined Routines and Data Types Developer's Guide.

Table 3 describes the data types that you can define for a database.

Table 3. Data Types
Data Type Explanation Examples
Built-in data types Fundamental data types that cannot be broken into smaller pieces

Serve as building blocks for other data types.

  • BLOB
  • BOOLEAN
  • BYTE
  • CHAR(n)
  • CHARACTERVARYING(m,r)
  • CLOB
  • DATE
  • DATETIME
  • DECIMAL or NUMERIC(p,s)
  • DOUBLE PRECISION
  • FLOAT
  • INTEGER
  • INTERVAL
  • LVARCHAR(m)
  • MONEY(p,s)
  • NCHAR(n)
  • NVARCHAR(m,r)
  • REAL or SMALLFLOAT
  • SERIAL
  • SERIAL8
  • SMALLINT
  • TEXT
  • VARCHAR(n,r)
Complex data types Combination of other data types

An SQL statement can access individual components within the complex type.

Collection types Complex data types

Include groups of elements of the same data type, which can be any built-in or complex data type.

  • SET
  • LIST
  • MULTISET
Row types Complex data types

Include groups of related data fields of any data type that form a template for a record.

Named row type
Unnamed row type
User-defined data types Include distinct and opaque types
Distinct data types Have the same internal structure as existing data types

They have distinct names and functions that make them different from the source type.

CREATE DISTINCT TYPE birthday AS DATE
The data type is birthday.
Opaque data types User-defined types

The internal structure is not known to the database server.

CREATE OPAQUE TYPE fixlen_typ
(INTERNALLENGTH=8,
CANNOTHASH)
The data type is fixlen_typ.
DataBlade data types New data types from IBM Informix DataBlade modules

A DataBlade module is a collection of functions that describe special-purpose data types and all of their support functions. A DataBlade module can contain any or all of the previously described data types.

Examples of DataBlade modules include: IBM Informix
  • Image Foundation DataBlade module
  • Excalibur Text Search DataBlade module
  • IBM Informix Geodetic DataBlade module
  • IBM Informix Spatial DataBlade module
  • IBM Informix TimeSeries DataBlade module
  • IBM Informix TimeSeries Real-Time Loader DataBlade module
  • IBM Informix Video Foundation DataBlade module
  • IBM Informix Web DataBlade module
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]