(Contents)(Next)

Data Types

ADABAS D supports the following data types:

CHAR (N) N <= 254

For every SERVERDB, a default code, ASCII or EBCDIC, is specified which does not have to agree with the machine code. This default can then be overridden in each table column, as required. It is thus possible, e.g., to store all data on an ASCII computer in an EBCDIC coding. This may be desirable to avoid differing sorting sequences in a client-server configuration for CHAR values with upper and lower cases.

For transparent storage, there is, apart from ASCII and EBCDIC, the CHAR variant BYTE. In client-server configurations, contents from CHAR (N) BYTE columns are not converted implicitly into the code of the client.

VARCHAR (N) N <= 254

The internal storage of CHAR values is performed up to a length of 30 in a fixed format. Larger CHAR values are stored implicitly internally in a representation of varying length. By explicitly using the data type VARCHAR, even shorter CHAR values can be represented internally using varying length.

BOOLEAN

Often only the states "available/not available" or "true/not true" have to be distinguished for attributes. This can be done by CHAR(1) columns which have been set to appropriate values. But the embedding in a programming language such as C/C++ or COBOL is simplified by providing a boolean data type. It is easier to formulate WHERE qualifications with Boolean columns.

DATE

Here, an internal format is stored as YYYYMMDD. The external representation can be configured according to the usual conventions in Europe, North America, or in the Pacific region.

TIME

TIME values are kept internally in the form HHHHMMSS. As in the case of DATE values, it is possible to configure for different external representation. DATE and TIME values are special CHAR values. This means that, apart from the date and time functions, all CHAR functions can be applied to them.

TIMESTAMP

TIMESTAMP values are kept internally in the form

YYYYMMDDHHMMSSmmmµµµ

They are a combination of a DATE and TIME value extended by the specification of milliseconds and microseconds. In addition to their usage as a timestamp, it is also convenient to use them for time arithmetics, because then overflows in the day's portion need not be handled by the user. TIMESTAMP values are special CHAR values. This means that, apart from the date and time functions, all CHAR functions

can be applied to them.

FIXED (N,M)

For numeric values, a decimal fixed point representation with a maximum of 18 digits is provided.

FLOAT (N)

Apart from the fixed point representation by FIXED, a decimal floating point representation is available with a maximum precision of 18 places and a value range of 10 .

LONG

For storing non-formatted data (BLOB), ADABAS provides the data type LONG which can accept data of up to 2.1 GB per column. As with CHAR columns, the variants ASCII, EBCDIC, and BYTE are supported. ADABAS is thus in a position to manage extensive text, image, and voice information in an appropriate way.

The additional data types occurring in other SQLMODEs are understood by ADABAS and mapped onto those described above.


(Contents)(Next)