Tuples and Fields
ActiveSpaces spaces store data in tuples.
A tuple:
- Is a container for a sequence of field.
- Is equivalent to a row in a database.
- Represents a set of related data.
A field is similar to a column in a database table. Each field has a specific name, type and value, as shown in the following figure.
Tuples and fields function like rows and columns in a traditional database.
A tuple can be seen as a kind of map in which fields can be put or removed. A tuple can also be seen as a self-describing message. Tuples are platform independent, and can be serialized and deserialized.
For information on defining tuple fields, see FieldDef Methods.
- Field Type Conversion
When a tuple is stored into a space, the fields that it contains must match the names and types of the fields described in the space definition. If there is a type mismatch between a field contained in the tuple and the type of the field defined in the space field definition, then, if possible, ActiveSpaces performs an automated field conversion. If the conversion is not possible, the operation fails. - Guidelines to Define Key Fields
You must define at least one of the fields in the space definition as a key field. ActiveSpaces uses key fields to build a key-value index for the space.
Related concepts
Related reference
Copyright © Cloud Software Group, Inc. All rights reserved.