OLAP Data Model : Fields : Group Fields

Group Fields
A group field is a named field that contains one or more other fields. The contained fields are called nested fields and may be scalar, link, or group fields. The group field itself does not hold any values; values are stored by the contained leaf scalar and link fields. Note that all field names within a table must be unique, even for those contained within a group field. An example group field is shown below:
<table name="Person">
<fields> <!-- fields belonging to Person -->
<field name="Location">
<fields> <!-- fields belong to Location -->
<field name="Department" type="TEXT"/>
<field name="Office" type="TEXT"/>
</fields>
</field>
...
</fields>
</table>
Here, the group field Location contains the nested text fields Department and Office. In a query, the values of both nested fields are returned when the group field Location is requested. Below is another example consisting of link fields:
<table name="Message">
<fields>
<field name="Participants">
<fields>
<field name="Sender" type="LINK" table="Participant" inverse="MessageAsSender"/>
<field name="Recipients">
<fields>
<field name="ExternalRecipients" type="link" table="Participant" inverse="MessageAsExternalRecipient"/>
<field name="InternalRecipients" type="link" table="Participant" inverse="MessageAsInternalRecipient"/>
</fields>
</field>
</fields>
</field>
...
</fields>
</table>
In this example, the group field Participants contains a link called Sender and a nested group called Recipients, which has two additional links ExternalRecipients and InternalRecipients. The values of all three link fields can be retrieved by requesting the Participants in a query.