Data types

In GDBase data types are assigned to columns in tables. This means, that unlike in SQLLite version 3 the data types of values must match the types of columns in which they are stored.

The following data types can be used in GDBase:

TEXT:

The value is a text string.

The following type names can also be used to denote a column of type TEXT: CHAR, VARCHAR, LONGVARCHAR, LONG VARCHAR, CLOB.

INTEGER:

The value is a signed integer, stored in 1, 2, 3, 4, 6, or 8 bytes, depending on the magnitude of the value. Hence, it is possible to store any integer between -263 and 263-1.

The following type names can also be used to denote a column of type INTEGER: INT, TINYINT, SMALLINT, BIGINT.

REAL:

The value is a floating point number, stored as an 8 byte value compliant with the IEEE 754-2008 standard. The largest (in absolute value) number that can be represented by REAL: is ca. 1.8e308, while the smallest is ca. 4.94e-324. See the Wikipedia page on double precision numbers for more information.

The following type names can also be used to denote a column of type REAL: FLOAT, DOUBLE, DOUBLE PRECISION, DECIMAL, NUMERIC.

DATE:

Stores the date.

TIME:

Stores the time.

DATETIME:

Stores date and time.

The type name TIMESTAMP is an alternative for DATETIME.

Note

DATE, TIME and DATETIME are stored as appropriately formatted strings in the data base tables, but to the user they appear as date, time or datetime objects.

BLOB:

The value is a blob of data, stored exactly as it was input.

Data type names are treated as keywords and cannot be used as identifiers.

It is recommended not to use columns without a defined data type. While SQL commands should work in this case, values from such columns may not be properly interpreted by AdvancedMiner.

Automatic conversions between data types and comparisons between different data types are not supported and may lead to unpredictable results. The CAST statement can be used to resolve data type compatibility problems in expressions.