Atomic Data Types

An instance of an atomic data type is a single, indivisible unit of data. The following table lists the atomic types currently available. For each type, a description of its instances is given.

Table 2-1 Atomic Data Types

Data Type Description Example
INTEGER An integer between -2^31 to 2^31-1.

2147483647

LONG An integer between -2^63 to 2^63-1.

9223372036854775807

FLOAT A single precision IEEE 754 floating point number. 100.12345
DOUBLE A double precision IEEE 754 floating point number.

100.12345678901234

NUMBER An arbitrary-precision signed decimal number (equivalent to the Java BigDecimal type). 100.123456789
STRING A sequence of zero or more unicode characters. "Oracle"
BOOLEAN Has only two possible values. TRUE and FALSE. TRUE
BINARY An uninterpreted sequence of zero or more bytes.

Type: BINARY

Type Instance: "0x34 0xF5"

FIXED BINARY (S) An uninterpreted sequence of S bytes.

Type: BINARY(3)

Type Instance: "0x34 0xF5 0xAB"

ENUM (T1, T2, …, Tn) One of the symbolic tokens (T1, T2, …, Tn) explicitly listed in the ENUM type. The order in which the tokens are listed is important. For example, ENUM(a, b) and ENUM(b, a) are two distinct types.

Type: ENUM(Chennai, Bangalore, Boston)

Type Instance: Boston

TIMESTAMP (P)

A value representing a point in time as a date (year, month, day), time (hour, minute, second), and number of fractions of a second.

The scale at which fractional seconds are counted is called precision P of a timestamp. The minimum precision is 0 and maximum is 9. For example, a precision of 0 means that no fractional seconds are stored, 3 means that the timestamp stores milliseconds, and 9 means a precision of nanoseconds.

There is no timezone information stored in timestamp; they are all assumed to be in the UTC timezone.

Type: timestamp(3)

Type Instance : '2020-01-20T12:15:054'

In addition to the kind of atomic values described above, the Oracle NoSQL Database data model includes the following 2 atomic values:

Table 2-2 Atomic Values

Data Type Description
JSON NULL This is considered to be an instance of the JSON data type. For more information about JSON, see Wildcard Data Types.
SQL NULL This is a special value that is used to indicate the fact that a value is unknown or inapplicable. NULL is assumed to be an instance of every data type.

Note:

Although an instance of a numeric type may be semantically equivalent to an instance of another numeric type, the 2 instances are distinct. For example, there is a single number 3 in the universe, but there are 5 different instances of 3 in the data model, one for each of the numeric types.