Numeric and Boolean Data Types
Numeric and Boolean types are used to represent data with different precision and scale. Integer values are supported from a 1-byte signed int up to an 8-byte signed int. All integers are signed in Ocient. Floating point values are possible as either single or double precision, and exact decimal precision is available with the Decimal type. The Boolean type is used to represent true or false in the database. All numeric types are fixed-length data types.- BIGINT — 8-byte signed integer
- INT — 4-byte signed integer
- SMALLINT — 2-byte signed integer
- TINYINT — 1-byte signed integer (alias:
BYTE) - FLOAT — 4-byte single precision floating-point number (alias:
REALorSINGLE PRECISION) - DOUBLE — 8-byte double precision floating-point number (alias:
DOUBLE PRECISION) - DECIMAL(P,S) — Exact numerical decimal value with precision P and Scale S
- BOOLEAN — 1-byte logical Boolean representing true or false
- Math Functions and Operators
- Scalar Data Conversion Functions
- Aggregate Functions
- Formatting Functions
Character and Binary Types
Character Types represent text and character data. Both fixed-length and variable-length options are available. Fixed-length provides some benefits to the database storage and query engine when applicable, but indexes are available that target variable-length character columns. Binary types represent byte array data.- CHAR(N) — Variable-length character string with length N (alias:
CHARACTER(N)) - VARCHAR(N) — Variable-length character string with a maximum length of N
- BINARY(N) — Fixed-length binary array with length N (alias:
HASH(N)) - VARBINARY(N) — Variable-length binary array with maximum length N (alias:
HASH(N))
The database ignores length of N for CHAR, VARCHAR, and VARBINARY. The database uses N for SQL conformance only.
Date and Time Types
Date and Time types are used to represent time in Ocient. Timestamps take on special capabilities when defined as a on a table. This is described in more detail in TimeKeys and Clustering Keys. Ocient provides many functions to operate on time series data.- DATE — 4-byte Calendar date representing year, month, day
- TIMESTAMP — 8-byte date and time with nanosecond precision in UTC time zone
- TIME — 8-byte time of day in nanoseconds
Networking and Unique Identifier Types
Ocient provides data types for processing of IP addresses and UUIDs that allow schemas to leverage improved searching and analysis of both types as well as easier loading of structured data into these types. The IP type is designed for IP V6 and can handle IP V4 addresses as well.- IPV4 — 4-byte Internet Protocol V4 address
- IP — 16-byte Internet Protocol V6 address
- UUID — 16-byte universally unique identifier (e.g., 01234567-89ab-cdef-1357-0123456789ab)
Geospatial Data Types
Geospatial analysis is a rich capability in Ocient enabled by special data types and functions. The foundation rests on POINT, LINESTRING, and POLYGON types that represent respective points and shapes on the Earth. From these and composites of these types, many proximity, intersection, and computational geospatial analytics can be performed at an incredible scale.- POINT — Geometric point in 2 dimensions.
- LINESTRING — Geometric type composed of
NPOINTS. - POLYGON — Geometric type composed of
Nclosed LINESTRINGS.
Complex Types
Arrays and Tuples are SQL container types used to store other SQL types. These allow for complex schemas to be represented as a column in a table instead of separate, normalized tables. In some situations, using Arrays, Tuples, or Arrays of Tuples can lead to significant performance benefits. Use the Matrix type to store one or two-dimensional arrays of fixed-size data types for matrix computations.- ARRAY — An array of any supported type other than ARRAY.
- MATRIX — A one or two-dimensional mathematical matrix used for matrix calculations.
- TUPLE — A tuple of elements of different types. Tuple is similar to a structure in other programming languages. You can include Tuples in arrays.

