Tutorial dekho queries

36
Dekho queries

description

Slides to accompany this post: http://www.dekho.com.au/understanding-queries-and-saying-goodbye/

Transcript of Tutorial dekho queries

Page 1: Tutorial   dekho queries

Dekho queries

Page 2: Tutorial   dekho queries

Agenda

• Introduction to Dekho queries

• Query types and how to use them

• Spatially enabled queries

• Best practices and considerations

Page 3: Tutorial   dekho queries

Complete the picture… with queries..

Page 4: Tutorial   dekho queries

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

Page 5: Tutorial   dekho queries

Query sources

• JDBC connection

• Esri ArcGIS Server Map Service (GDB Only)

• Web Service

Page 6: Tutorial   dekho queries

Query types • Searching

– Search

– Combo + Type-Ahead

• Result viewing

– Layer Information Query

– Feature Info Query

• Others

– Call out

– Integration

1

2

3

Page 7: Tutorial   dekho queries
Page 8: Tutorial   dekho queries

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%

Page 9: Tutorial   dekho queries

User data entry fields • Go into the “Where

clause” of the search SQL statement

• Text / Date / List / Drop Down

Page 10: Tutorial   dekho queries

Type-ahead Combo-box

Page 11: Tutorial   dekho queries

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 = What you use

• Ordered (? Your call…)

ID Value

Vic Victoria

NSW New South Wales

Tas Tasmania

WA West Australia

SA South Australia

NT Northern Territory

Page 12: Tutorial   dekho queries

Search #2

Reusing Combo and Type-ahead

• Define once and reuse

Combo-Box Query

Search #1 Search #3

Page 13: Tutorial   dekho queries
Page 14: Tutorial   dekho queries

Working with search results • Working with a complete picture

• Connecting with non-spatial data sources

• Getting the information you need

ObjectID ObjectID

ObjectID ObjectID

ObjectID ObjectID

ObjectID ObjectID

Page 15: Tutorial   dekho queries

LIQ’s and FIQ’s

Layer Information

Specific feature Information

Page 16: Tutorial   dekho queries

Getting the information you need

Asset Mgmt System

Asset ID

GDB

Current Selected Feature

The information I wish to display

Page 17: Tutorial   dekho queries

Getting the information you need

ObjectID AssetID

AID

Asset Mgmt System

Asset ID

GDB ObjectID

Foreign Asset Id KEY

AssetID

Page 18: Tutorial   dekho queries

GDB link to 3rd party systems

Page 19: Tutorial   dekho queries

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)

Page 20: Tutorial   dekho queries

Getting the data you need

Asset Mgmt System

Asset ID

GDB

ObjectID+AssetID

Mapping relationship SELECTION.AssetID = AMS.AssetID

Page 21: Tutorial   dekho queries

LIQ’s and FIQ’s

Multiple queries span across multiple tabs

Page 22: Tutorial   dekho queries

Example: reviewing a property

Owners history list

Related approvals

Lot # information

FIQ1 FIQ2 FIQ3

Page 23: Tutorial   dekho queries

Queries and maps

Page 24: Tutorial   dekho queries

Query types • Searching

– Search

– Combo + Typeahead

• Result viewing

– Layer Information Query

– Feature Info Query

• Others

– Call out

– Integration

Page 25: Tutorial   dekho queries

Callout Query

• Any data source

• Select relevant fields

Page 26: Tutorial   dekho queries

Dekho Integration Query

• SQL query that translates one set of values (OBJECTID) to another (ASSETID)

Page 27: Tutorial   dekho queries

Dekho Integration Query

Page 28: Tutorial   dekho queries

Dekho Integration Query

Page 29: Tutorial   dekho queries

Query types • Searching

– Search

– Combo + Typeahead

• Result viewing

– Layer Information Query

– Feature Info Query

• Others

– Call out

– Integration

Page 30: Tutorial   dekho queries

Spatial selection

I want users to search a heritage site and see properties

that intersect with the selected heritage site

Page 31: Tutorial   dekho queries

Spatial selection

Heritage site layer

Property lot layer

Spatial query

Search query

Page 32: Tutorial   dekho queries

Queries points for consideration

Page 33: Tutorial   dekho queries

Remember!! • Spatial query is optional

– Search query

– Feature Info query

• Results are from the TARGET layer

Page 34: Tutorial   dekho queries

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

Page 35: Tutorial   dekho queries

Complete the picture… with queries..

Page 36: Tutorial   dekho queries

Product Information:

www.esriaustralia.com.au/dekho

www.esriaustralia.com.au/dekhohelp

www.esriaustralia.com.au/dekhoblog