OLAP Data Model : Fields : Scalar Fields

Scalar Fields
Scalar fields store simple data such as numbers or text. A single-valued (SV) scalar field stores a single value per object. Multi-valued (MV) scalar fields, also called scalar collections, can store multiple values per object. The scalar field types supported by Doradus are summarized below:
Text: An arbitrary length string of Unicode characters.
Boolean: A logical true or false value.
Integer and Long: A signed 64-bit integer value. These two types are synonyms.
Float: A 32-bit floating-point value.
Double: A 64-bit floating-point value.
Timestamp: A date/time value with millisecond precision. Doradus treats all timestamp values as occurring in the UTC time zone. Timestamp values must be given in the format:
yyyy-MM-dd HH:mm:ss.SSS
where:
yyyy is a 4-digit year between 0000 and 9999
MM is a 1- or 2-digit month between 1 and 12
dd is a 1- or 2-digit day-of-month between 1 and 31
HH is a 1- or 2-digit hour between 0 and 23
mm is a 1- or 2-digit minute between 0 and 59
ss is a 1- or 2-digit second between 0 and 59
SSS is a 1-to-3 digit millisecond between 0 and 999
Only the year component is required. All other components can be omitted (along with their preceding separator character) in right-to-left order. Omitted time elements default to 0; omitted date elements default to 1. Hence, the following timestamp values are all valid:
2011-02-01 08:50:01.123
2011-02-01 08:50:01 // same as 2011-02-01 08:50:01.000
2011-02-01 08:50 // same as 2011-02-01 08:50:00.000
2011-02-01 08 // same as 2011-02-01 08:00:00.000
2011-02-01 // same as 2011-02-01 00:00:00.000
2011-02 // same as 2011-02-01 00:00:00.000
2011 // same as 2011-01-01 00:00:00.000
Binary: An arbitrary length sequence of bytes. A binary field definition includes an encoding (Base64 or Hex) that defines how values are encoded when sent to or returned by Doradus.
When type names are used in schema definitions, they are case-insensitive (e.g., integer or INTEGER). Example field definitions in XML are shown below:
<fields>
<field name="SendDate" type="TIMESTAMP"/>
<field name="Size" type="INTEGER"/>
<field name="Subject" type="TEXT"/>
<field name="IsInternal" type="BOOLEAN"/>
</fields>
By default, scalar fields are SV. Assigning an SV scalar field for an existing object replaces the existing value, if present. A scalar field can be declared MV by setting its collection property to true. Example:
<field name="Tags" collection="true" type="TEXT"/>
MV scalar field values are added and removed individually and treated as a set: duplicate values are not stored. This preserves idempotent update semantics: adding the same value twice is a no-op.