Atomic Data Types

 

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 TypeDescriptionExample
INTEGERAn integer between -2^31 to 2^31-1.

2147483647

LONGAn integer between -2^63 to 2^63-1.

9223372036854775807

FLOATA single precision IEEE 754 floating point number.100.12345
DOUBLEA double precision IEEE 754 floating point number.

100.12345678901234

NUMBERAn arbitrary-precision signed decimal number (equivalent to the Java BigDecimal type).100.123456789
STRINGA sequence of zero or more unicode characters."Oracle"
BOOLEANHas only two possible values. TRUE and FALSE.TRUE
BINARYAn 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

No comments:

Post a Comment