Data Types

This page gives an overview about the data types supported by Polypheny.

Scalar Types

TypeDescription
BIGINT8 bytes signed (two’s complement). Ranges from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
BOOLEAN1-bit. Takes the value true and false.
DATERepresents a date. Format: yyyy-mm-dd
DECIMALA decimal number is a number that can have a decimal point in it. This type has two arguments: precision and scale. The scale can not exceed the precision.
DOUBLE8 bytes IEEE 754. Covers a range from 4.94065645841246544e-324d to 1.79769313486231570e+308d (positive or negative).
INTEGER4 bytes, signed (two’s complement). Covers a range from -2,147,483,648 to 2,147,483,647.
REAL4 bytes, IEEE 754. Covers a range from 1.40129846432481707e-45 to 3.40282346638528860e+38 (positive or negative).
SMALLINT2 bytes, signed (two’s complement). Covers a range from -32,768 to 32,767.
TIMERepresents a time of day without time zone. Optionally, precision can have a value between 0 and 3 specifying the number of fractional seconds. Format: hh:mm:ss.f
TIMESTAMPRepresents a combination of DATE and TIME values. Optionally,precision can have a value between 0 and 3 specifying the number of fractional seconds. Format: yyyy-mm-dd hh:mm:ss.f
TINYINT1 byte, signed (two’s complement). Covers a range from -128 to 127.
VARCHARString (can contain letters, numbers, and special characters) with variable length. The maximum length is specified as parameter.

Array Types

An array is an ordered, contiguous collection that may contain duplicates. Polypheny-DB supports arrays of all scalar types.

In Polypheny-DB, arrays can have an arbitrary dimension and cardinality. Both are specified as arguments. Specifying -1 disables validation.

The dimension specifies how deep arrays can be nested. A dimension of one therefore means that nested arrays are not allowed while a dimension of two allows nested arrays but no nested arrays within nested arrays.

The cardinality specifies the number of elements (values and nested arrays) in every (nested) array.

Multimedia and File Types

Polypheny-DB natively supports storing files. In addition to the generic FILE data type there are also additional types for multimedia content. Multimedia files are not checked by their file extension, but by their content type. See SimpleMagic.ContentType for more information.

TypeDescription
SOUNDAccepted content types: AIFF, AUDIO/MPEG, MIDI, REAL/AUDIO, WAV
FILEAccepts files of any type.
IMAGEAccepted content types: APPLE_QUICKTIME_IMAGE, BMP, GIF, JPEG, JPEG 2000, PBM, PGM, PNG, PPM, SVG, TIFF
VIDEOAccepted content types: APPLE_QUICKTIME_MOVIE, AVI, MNG, MP4A, MP4V, VIDEO/MPEG