-
Notifications
You must be signed in to change notification settings - Fork 1
Select ... From ... Where ...
The Select ... From ... Where ... DML statement is used to select records from a table/view that meet the condition defined in the Where Clause.
In the GeoDMS first a new domain unit needs to be configured with the e.g. the subset function, resulting in a subitem called Nr_OrgEntity with as values unit the index numbers of the original domain. This Nr_OrgEntity attribute can be used to get the data from the original domain for the new subset domain, using the lookup function (see examples).
Assume the following SQL Statement:
Select Street, Number, Zipcode, Town From Appartment Where Town = 'BTown'
This statement can be applied on our Relational model versus Semantic arrays, resulting in the following data:
images/Relation_select_from_where1.png
GeoDMS configuration (the Appartment domain unit is configured in a src container):
unit<uint32> singleAttSelection := subset(src/Appartment/Town == 'BTown')
{
attribute<string> Street := src/Appartment/Street[Nr_OrgEntity];
attribute<uint32> Number := src/Appartment/Number[Nr_OrgEntity];
attribute<string> ZipCode := src/Appartment/ZipCode[Nr_OrgEntity];
attribute<string> Town := src/Appartment/Town[Nr_OrgEntity];
}
Assume the following SQL Statement:
Select Street, Number, Zipcode, Town From Appartment Where ZipCode = 'AA6681' And Number = 3
This statement can be applied on our relation model, resulting in the following data:
images/Relation_select_from_where2.png
GeoDMS configuration (the Appartment domain unit is configured in a src container):
unit<uint32> multipleAttSelection := subset(src/Appartment/ZipCode == 'AA6681' && src/Appartment/Number == 3)
{
attribute<string> Street := src/Appartment/Street[Nr_OrgEntity];
attribute<uint32> Number := src/Appartment/Number[Nr_OrgEntity];
attribute<string> ZipCode := src/Appartment/ZipCode[Nr_OrgEntity];
attribute<string> Town := src/Appartment/Town[Nr_OrgEntity];
}
GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.