Relational model versus Semantic arrays dml

The Select Distinct … From … statement is used to select unique occurrences of one or more attributes from a table.

single attribute selection

Assume the following SQL Statement:

Select Distinct Town From Appartment

This statement can be applied on our relation model, resulting in the following data:

For a SQL Distinct statement in the GeoDMS a new domain-unit needs to be configured with the unique function. This function generates a subitem called Values, containing the unique occurrences of it’s argument, in alphabetic order.

GeoDMS configuration (the Appartment domain unit is configured in a src container):

unit<uint32> Town := unique(src/Appartment/Town);

multiple attributes selection

Assume the following SQL Statement:

Select Distinct Town, ZipCode From Appartment

The GeoDMS unique function does not support multiple arguments. Therefore concatenate the Town and ZipCode attributes, see the example:

unit<uint32> TownZipCode := unique(src/Appartment/Town + '_' + src/Appartment/ZipCode);