4. Dekho queries
• Pull information from data sources
– Internal / External
– Database / Web service / Map service
• Defined in Dekho Studio
• Executed in runtime by end user
• Require some SQL skills
• Reusable between applications
5. Query sources
• JDBC connection
• Esri ArcGIS Server Map Service (GDB Only)
• Web Service
6. Query types
• Searching
– Search 1
– Combo + Type-Ahead
• Result viewing
– Layer Information Query 2
– Feature Info Query 3
• Others
– Call out
– Integration
7.
8. Defining a Search Query
• Always executed against a feature class in the GDB
• Returning a single spatial feature set (ObjectID)
• User interaction – data entry fields (optional)
Select * from [Feature Class]
Where [User data entry]
Select * from properties
Where street_name like %Manningtree%
9. User data entry fields
• Go into the “Where
clause” of the search
SQL statement
• Text / Date / List / Drop
Down
11. Combo and Type-ahead
• Structure user data entry in search queries
• ANY database (not just the GDB)
• Lists Of Values (LOV):
– Value = What you display ID Value
– ID = What you use Vic Victoria
• Ordered (? Your call…) NSW New South Wales
Tas Tasmania
WA West Australia
SA South Australia
NT Northern Territory
12. Reusing Combo and Type-ahead
• Define once and reuse
Search #1 Search #2 Search #3
Combo-Box
Query
13.
14. Working with search results
• Working with a complete picture
• Connecting with non-spatial data
ObjectID
sources ObjectID
ObjectID
ObjectID
ObjectID
• Getting the information you need ObjectIDObjectID
ObjectID
19. Getting the information you need
ObjectID AssetID
AID
X Y Z
What Dekho does:
1. Get AssetId by ObjectID (GDB)
2. Find row in AMS table based on AssetID
3. Select relevant fields (X,Y,Z)
20. Getting the data you need
Asset ID ObjectID+AssetID
Mapping relationship
SELECTION.AssetID = AMS.AssetID
Asset Mgmt
GDB
System
33. Remember!!
• Spatial query is optional
– Search query
– Feature Info query
• Results are from the TARGET layer
34. Queries points for consideration
• Renaming DB fields names to logical names
select Field_Name1 as “User Friendly Name1”
• Complete the picture vs. Information overload
– Avoid select * statements
– Use multiple FIQ’s and LIQ’s
– Map to end user workflow
• Query performance optimization