Query Ocient
Understanding Data Types
{{ocient}} supports many common data types such as int, short, date, and timestamp as well as complex types like array and tuple and specialized data types like point and linestring used for geospatial analysis for detailed information about supported data types, refer to the docid\ ogtviwl gtbgv0chhrh 3 page all of the following data types can be used as types for columns in tables and for queries when used in queries, docid\ bvivszia9qovupkl4waxs can be used to manipulate data types and various functions and aggregates can be run depending on the data type for example, numeric types can be summed, averaged or be processed with other statistical functions, and character types can be trimmed, manipulated, or aggregated into a single string basic data types such as int, boolean, and varchar behave similarly to other databases complex types such as arrays and tuples can be queried and inspected like any other column and also have special operators used to interrogate the sets of data 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 real or single 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 learn more about working with numeric data types in the following sections docid\ e2c2vckzh8dfsbp1wngpr docid\ bvivszia9qovupkl4waxs docid\ qtfpyds4dv4jap2 s6v g docid\ u47hjysi1oojk6eg2kjut 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 learn more about working with character and binary data types in the following sections docid\ kolkdboplprrwxs3g6gsh docid\ bvivszia9qovupkl4waxs docid 6ysvgmcg45ereu6od sxn date and time types date and time types are used to represent time in ocient timestamps take on special capabilities when defined as a {{timekey}} on a table this is described in more detail in docid 21n4t9o37 dsjnmgsgj1o 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 learn more about working with date and time data types in the following sections docid\ zcon ufstf4uhc5airgpg docid 6wlmm94r86xl pht xkrd docid\ u47hjysi1oojk6eg2kjut 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 n points polygon — geometric type composed of n closed linestrings learn more about working with geospatial types in the docid ncku w2ufneog xx3esf section 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 learn more about complex data types in the following sections docid 89kk83 gif3icefcy1kuw docid\ xunz45zvbfsvnbhzy99v5 docid\ dwjpaeks9otz2u sav2lj docid 6ysvgmcg45ereu6od sxn related links docid\ qcf0x9ao4a56x id39pkr docid\ twelobi0rarxjfiot1a70