Supported Data Types

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

#idTypeSQL typeDescriptionJava typeMinimum
Maximum
Auto-conversion from/to
0BooleanBOOLEANHandles only the values True or Falsejava.lang.Boolean or boolean0
1
String
1IntegerINTEGER32-bit signed Integersjava.lang.Integer or int-2,147,483,648
+2,147,483,647
Any Number, String
2ShortSHORTSmall 16-bit signed integersjava.lang.Short or short-32,768
32,767
Any Number, String
3LongLONGBig 64-bit signed integersjava.lang.Long or long-263
+263-1
Any Number, String
4FloatFLOATDecimal numbersjava.lang.Float or float2-149
(2-2-23)*2127
Any Number, String
5DoubleDOUBLEDecimal numbers with high precisionjava.lang.Double or double2-1074
(2-2-52)*21023
Any Number, String
6DatetimeDATETIMEAny date with the precision up to milliseconds. To know more about it, look at Managing Datesjava.util.Date-
1002020303
Date, Long, String
7StringSTRINGAny string as alphanumeric sequence of charsjava.lang.String-
-
-
8BinaryBINARYCan contain any value as byte arraybyte[]0
2,147,483,647
String
9EmbeddedEMBEDDEDThe Record is contained inside the owner. The contained Record has no Record IDORecord-
-
ORecord
10Embedded listEMBEDDEDLISTThe Records are contained inside the owner. The contained records have no Record ID's and are reachable only by navigating the owner recordList<Object>0
41,000,000 items
String
11Embedded setEMBEDDEDSETThe Records are contained inside the owner. The contained Records have no Record ID and are reachable only by navigating the owner recordSet<Object>0
41,000,000 items
String
12Embedded mapEMBEDDEDMAPThe Records are contained inside the owner as values of the entries, while the keys can only be Strings. The contained ords e no Record IDs and are reachable only by navigating the owner RecordMap<String, ORecord>0
41,000,000 items
Collection<? extends ORecord<?>>, String
13LinkLINKLink to another Record. It's a common one-to-one relationshipORID, <? extends ORecord>1:-1
32767:2^63-1
String
14Link listLINKLISTLinks to other Records. It's a common one-to-many relationship where only the Record IDs are storedList<? extends ORecord0
41,000,000 items
String
15Link setLINKSETLinks to other Records. It's a common one-to-many relationshipSet<? extends ORecord>0
41,000,000 items
Collection<? extends ORecord>, String
16Link mapLINKMAPLinks to other Records as value of the entries, while keys can only be Strings. It's a common One-to-Many Relationship. Only the Record IDs are storedMap<String,
    ? extends Record>
0
41,000,000 items
String
17ByteBYTESingle byte. Useful to store small 8-bit signed integersjava.lang.Byte or byte-128
+127
Any Number, String
18TransientTRANSIENTAny value not stored on database
19DateDATEAny date as year, month and day. To know more about it, look at Managing Datesjava.util.Date--Date, Long, String
20CustomCUSTOMused to store a custom type providing the marshall and unmarshall methodsOSerializableStream0
X
-
21DecimalDECIMALDecimal numbers without roundingjava.math.BigDecimal?
?
Any Number, String
22LinkBagLINKBAGList of Record IDs as spec RidBagORidBag?
?
-
23AnyANYNot determinated type, used to specify Collections of mixed type, and null---