OceanBase Database supports the array data type (ARRAY), which can be used to store and process multiple elements of the same type.
The following array element types are supported in the current version of OceanBase Database:
Integer types:
TINYINT,SMALLINT,INT/INTEGER, andBIGINT.Floating-point types:
FLOATandDOUBLE.String types:
VARCHAR.
The following points apply:
The array type is a commonly used data type in OLAP scenarios, primarily for storing and processing multiple data elements of the same type.
When describing a multivalued attribute of an entity (for example, a product belonging to multiple categories, user tags, or multiple measurements from a sensor), the array type can more naturally represent this relationship.
During data analysis, it is often used to determine whether a specific value exists in the array.
The following limitations apply:
- The array type does not support setting default values.
In addition to providing the array data type, functions for array data are also available. For more information, see Array functions.
