Data Types

ArcadeDB supports several data types natively. Below is the complete table.

Type SQL type Description Java type Minimum — Maximum Auto-conversion from/to

Boolean

BOOLEAN

Handles only the values True or False

java.lang.Boolean or boolean

0 — 1

String

Integer

INTEGER

32-bit signed Integers

java.lang.Integer or int

-2,147,483,648 — +2,147,483,647

Any Number, String

Short

SHORT

Small 16-bit signed integers

java.lang.Short or short

-32,768 — 32,767

Any Number, String

Long

LONG

Big 64-bit signed integers

java.lang.Long or long

-263 — +263-1

Any Number, String

Float

FLOAT

Decimal numbers

java.lang.Float or float

2-149 — (2-2-23)*2127

Any Number, String

Double

DOUBLE

Decimal numbers with high precision

java.lang.Double or double

2-1074 — (2-2-52)*21023

Any Number, String

Datetime

DATETIME

Any date with the precision up to milliseconds. To know more about it, look at Managing Dates

java.util.Date

Date, Long, String

String

STRING

Any string as alphanumeric sequence of chars

java.lang.String

Binary

BINARY

Can contain any value as byte array

byte[]

0 — 2,147,483,647

String

Embedded

EMBEDDED

The Record is contained inside the owner. The contained record has no RID

EmbeddedDocument

EmbeddedDocument

Embedded list

LIST

The Records are contained inside the owner. The contained records have no RIDs and are reachable only by navigating the owner record

List<EmbeddedDocument>

0 — 41,000,000 items

String

Embedded map

MAP

The Records are contained inside the owner as values of the entries, while the keys can only be Strings. The contained records have no RIDs and are reachable only by navigating the owner Record

Map<String, EmbeddedDocument>

0 — 41,000,000 items

Collection<? extends EmbeddedDocument<?>>, String

Link

LINK

Link to another Record. It’s a common one-to-one relationship

RID, <? extends Record>

1:-1 — 32767:263-1

String

Byte

BYTE

Single byte. Useful to store small 8-bit signed integers

java.lang.Byte or byte

-128 — +127

Any Number, String

Decimal

DECIMAL

Decimal numbers without rounding

java.math.BigDecimal

Any Number, String

Vector

ARRAY_OF_?

Vector of scalar types: SHORTS, INTEGERS, LONGS, FLOATS, DOUBLES. A full type is for example then ARRAY_OF_FLOATS

Tuples

Embedded types, like EMBEDDED (document), (embedded) LIST, and (embedded) MAP are non-scalar types.
A vector type can be either LIST OF SHORT|INTEGER|LONG|FLOAT|DOUBLE or ARRAY_OF_SHORTS|INTEGERS|LONGS|FLOATS|DOUBLES.
When serializing floating point types FLOAT and DOUBLE to JSON, NaN, Inf, and -Inf are cast to null.

Embedded MAP vs EMBEDDED Document

A MAP type and an EMBEDDED type are both a hierarchy of key-value pairs (think JSON); but the EMBEDDED type requires a @type property in its top-level referencing an existing document type. Hence, to embed a document, a document type needs to be declared beforehand, such that upon embedding validity of constrains (if existing) can be checked.