Arrays
The array data type is a one-dimensional list of values with the same data type. This type enables the support of a one-to-many relationship without creating another table. You create secondary indexes on arrays, which index the elements of the array. For details about secondary indexes, see Secondary Indexes. Key features:- Variable size.
- Can contain many elements.
- Indexing into the array starts at
1. - Invalid access of the array returns NULL.
[1, 2, 3] using the sys.dummy virtual table.
SQL
Text
[[1, 2, 3], [4, 5, 6]].
SQL
Text
SQL
Tuples
The tuple data type is a row. This type is a fixed-sized collection of heterogeneous values. Tuples support more complex recursive computational functions. The memory structure of the tuple is identical to the memory structure of the array type. The only difference is that each entry in a tuple can be any type, so the Ocient System can simultaneously store both fixed and variable-sized values in a tuple. Examples Create a tuple with fixed-size types. In this case, use three integers.SQL
Text
SQL
SQL
Text
SQL
Text
matrices
A matrix is a fixed-size two-dimensional array ofDOUBLE values. A matrix can be a row vector (1xN matrix) or column vector (Nx1 matrix).
matrices support machine learning model calculations. For details, see Machine Learning in Ocient.
Examples
Create a 1x4 matrix with numbers 1 through 4 using the make_matrix function that expects values in row-major order. The first two arguments indicate the dimensions of the matrix, and the remaining arguments specify the values for the matrix.
SQL
Text
SQL
Text
SQL
Text

