TerminusDB Data Types

Core data types

Type
W3C specification
Description
xsd:string
​W3C​
Character strings (but not all Unicode character strings)
xsd:boolean
​W3C​
true, false
xsd:decimal
​W3C​
Equivalent to xsd:double
xsd:integer
​W3C​
Arbitrary-size integer numbers

IEEE floating-point numbers

Type
W3C specification
Description
xsd:double
​W3C​
64-bit floating point numbers incl. ∓Inf, ∓0, NaN
xsd:float
​W3C​
32-bit floating point numbers incl. ∓Inf, ∓0, NaN

Time and date

Type
W3C specification
Description
xsd:date
​W3C​
Dates (yyyy-mm-dd) with or without timezone
xsd:time
​W3C​
Times (hh:mm:ss.sss) with or without timezone
xsd:dateTime
​W3C​
Date and time with or without timezone
xsd:dateTimeStamp
-
Date and time with required timezone

Recurring and partial dates

Type
W3C specification
Description
xsd:gYear
​W3C​
Gregorian calendar year
xsd:gMonth
​W3C​
Gregorian calendar month
xsd:gDay
​W3C​
Gregorian calendar day of the month
xsd:gYearMonth
​W3C​
Gregorian calendar year and month
xsd:gMonthDay
​W3C​
Gregorian calendar month and day
xsd:duration
​W3C​
Duration of time
xsd:yearMonthDuration
-
Duration of time (months and years only)
xsd:dayTimeDuration
-
Duration of time (days, hours, minutes, seconds only)

Limited-range integer numbers

Type
W3C specification
Description
xsd:byte
​W3C​
-128...+127 (8 bit)
xsd:short
​W3C​
-32768...+32767 (16 bit)
xsd:int
​W3C​
-2147483648...+2147483647 (32 bit)
xsd:long
​W3C​
-9223372036854775808...+9223372036854775807 (64 bit)
xsd:unsignedByte
​W3C​
0...255 (8 bit)
xsd:unsignedShort
​W3C​
0...65535 (16 bit)
xsd:unsignedInt
​W3C​
0...4294967295 (32 bit)
xsd:unsignedLong
​W3C​
0...18446744073709551615 (64 bit)
xsd:positiveInteger
​W3C​
Integer numbers >0
xsd:nonNegativeInteger
​W3C​
Integer numbers ≥0
xsd:negativeInteger
​W3C​
Integer numbers <0
xsd:nonPositiveInteger
​W3C​
Integer numbers ≤0

Encoded binary data

Type
W3C specification
Description
xsd:hexBinary
​W3C​
Hex-encoded binary data
xsd:base64Binary
​W3C​
Base64-encoded binary data

Miscellaneous XSD types

Type
W3C specification
Description
xsd:anyURI
​W3C​
Absolute or relative URIs and IRIs
xsd:language
​W3C​
Language tags per BCP47​
xsd:normalizedString
​W3C​
Whitespace-normalized strings
xsd:token
​W3C​
Tokenized strings
xsd:NMTOKEN
​W3C​
XML NMTOKENs
xsd:Name
​W3C​
XML Names
xsd:NCName
​W3C​
XML NCNames
Last modified 12d ago