Data Objects and Types 
A data object describes data and serves as a data carrier in the context or the result of an expression or an action. Data objects can be further described by their type, namely element, structure, or table.
For an elementary data object, you can define the set of comparison operations that is supported by a particular data object. This is helpful when a data object is used in a comparison against a range expression. If the data object does not support the comparison type in question, the system can determine this mismatch already at design time and thus prevent you from running into problems at runtime.
An elementary data object must have one of the following subtypes:
Element Type |
Text (Description) |
|---|---|
Text |
Character string (maximum length 255 characters)
The maximum length of text data objects refers to the maximum string length that can be stored in the database. In contrast to this limitation for persistent strings, you can use much longer strings as long as they are only used for internal calculations during a BRFplus session. For example, you can concatenate a number of strings to one very large string in a BRFplus formula, then search this large string for a particular string pattern and finally return a formula result (for example, the number of occurrences of the pattern in the large string). End of the note. |
Number |
Number with decimals |
Boolean |
Boolean value |
Amount |
Number and currency |
Quantity |
Number and unit of measure |
Timepoint |
The first three subtypes listed above are abstract values, i.e., there is no explicit time zone information stored along with values of that type. If you need precise and unambiguous date and time information in your application, you have to use the two UTC-based timepoint subtypes. End of the note. |
The structural relationships between the different types of data objects are shown in the following table:
Data Object Type |
Consists of |
|---|---|
Element |
Predefined data types (see table above) |
Structure |
Element (0..n) Structure (0..n) Table (0..n) |
Table |
Element (0..1) Structure (0..1) |
According to the relationships shown in the table above, it is useful to know how the different data object types are built upon each other:
An element represents a predefined, elementary data type that can neither be reduced to smaller parts nor extended in any way.
A structure is a combination of an arbitrary number of elements, of structures, or a combination of both. Especially the fact that a structure can consist of other structures (which again may consist of structures etc.) enables you to model data structures of any desired degree of hierarchical complexity.
The fields in a table are defined by either assigning exactly one element or one structure to the table. In other words, the field structure of a table is not implicitly built up by adding one field after another to the table. Rather, the table can only adopt the fields of a structure data object that has been created before. If you choose, however, to assign an element rather than a structure data object to a table, this results in a one-column table (that is, a simple list).