A Spatio-Temporal Query Language for a data model based on XML

Preview:

DESCRIPTION

A Spatio-Temporal Query Language for a data model based on XML. J. E. Córcoles, J. García-Consuegra, J. Peralta and E. Navarro. Index. Introduction STQ Syntax Query Processing Query Decomposition Operator Execution Example of Query Processing Conclusions Future Work. Index. - PowerPoint PPT Presentation

Citation preview

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

A Spatio-Temporal Query Language for a data model based

on XML.

J. E. Córcoles, J. García-Consuegra, J. Peralta and E. Navarro

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Index• Introduction

• STQ Syntax

• Query Processing» Query Decomposition

» Operator Execution

• Example of Query Processing

• Conclusions

• Future Work

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Index• Introduction

• STQ Syntax

• Query Processing» Query Decomposition

» Operator Execution

• Example of Query Processing

• Conclusions

• Future Work

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Introduction (I)

• XML (eXchanged Markup Language)

• XML => The solution to the problem of these heterogeneous systems

• XML => Exchange language of geographic information

• OpenGIS => GML (Geography Markup Language)

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Introduction (II)

• STQ (Spatio-Temporal Query language) over GML.

• Select-from-where syntax

• Spatial operators (overlap, cross, etc)

• Temporal operators (after, before, etc).

• Traditional operators (=,>, <,...) for non-spatial information

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Index• Introduction

• Syntax of STQ

• Query Processing» Query Decomposition

» Operator Execution

• Example of Query Processing

• Conclusions

• Future Work

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Syntax of STQ (I)

• Clean Semantics

• Path Expressions

• Ability to return an XML document

• Ability to query and return XML tags and attributes

• Intelligence type coercion

• Handles unexpected data

• Ability to allow queries when the DTD is not fully known

• Returns unnamed attributes

• Preserves Order

• Allows Spatial and Temporal operators

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Syntax of STQ (I)

1. Clean SemanticsSelect C.modelMember.Parcel.cadastreId

From [http://www.uclm.es//prove.xml].CityModel as C

Where C.name Like ‘Albacete’

2. Path ExpressionsC.modelMember.Parcel

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Syntax of STQ (II)

3. Ability to return an XML documentSelect C. ModelMemeber.Parcel.extendOf

From [http://www.uclm.es//prove.xml].CityModel as C

Where C.name Like ‘Albacete’ and Parcel.number = 103

The XML document return for the query is:<Polygon>

<outerBoundaryIs>

<LinearRing>

<coordinates>

0.0,0.0 40.0,0.0 40.0,10.0 0.0,10.0

</coordinates>

</LinearRing>

</outerBoundaryIs>

</Polygon>

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Syntax of STQ (III)

4. Ability to query and return XML tags and attributes

Select M.Parcel.extendOfFrom [http://www.uclm.es//probe.xml].CityMode.modelMember as MWhere M.(street%) Like ‘Capitan Grant’

5. Intelligence type coercion (String-Integer).

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Syntax of STQ (IV)

6. Handles unexpected data

7. Ability to allow queries when the DTD is not fully knownSelect C

From [http://www.uclm.es//prove.xml].CityModel as C

Where C.(name | description) Like ‘Albacete’

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Syntax of STQ (V)

8. Returns unnamed attributes

Select C.(^ modelDate, ^modelMember)From [http://www.uclm.es//prove.xml].CityModel as C

9. Preserves Order. » In the current version of STQ data order is not

preserved

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Syntax of STQ (VI)

10. Allows Spatial and Temporal operators

• Spatial Operators:»Disjoint, Meet, Equal, Overlap,

Contains, Inside), Covers and covered_by.

»Within, Near, Crossing, Along, Finish» Length, Surface, Perimeter and Buffering.

• Temporal Operators:» Date Is, After and Before

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Syntax of STQ (VII)

• Other features of STQ is the possibility to use several XML documents in the same query.

select_statement ::=.

.

FROM table_commalist: f1

table_commalist ::= addresshttp: d1 PERIOD table:s1 AS NAME:a1

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Index• Introduction

• Syntax of STQ

• Query Processing» Query Decomposition

» Operator Execution

• Example of Query Processing

• Conclusions

• Future Work

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Query Processing (I)

• The query process for a STQ query has two well-defined phases:» Query decomposition to transform the

STQ query into an Operator Tree.» To run the Algebra relational operators.

• Execution of alphanumeric operators (XQL)

• Execution of spatial operators (R-tree)

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Query Processing (II) Query Decomposition

• Query decomposition to transform the STQ query in an Operator Tree has four sub-phases:

• Normalization (conjunctive normal)

• Analysis (query graph or connection graph )

• Redundancy elimination • Rewriting (operator tree)

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Query Processing (III) Operator Execution

• After decomposition, a query may have two kinds of operators in the Select (Algebra relational) operator.» Alphanumeric operators (>,<,like): SQT is

based on XQL to execute alphanumeric operators

» Spatial operators STQ creates a R-tree spatial structure to execute spatial operators.

» Temporal operators: SQT is based on XQL to execute temporal operators of higher level.

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Index• Introduction

• Syntax of STQ

• Query Processing» Query Decomposition

» Operator Execution

• Example of Query Processing

• Conclusions

• Future Work

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Example of Query Processing (I)

• Example :

» To obtain all Parcel Identifiers (<modelMember><cadastreId>) that have a number (<modelMember><number>) greater than 100, and whose surface is contained in the zone with name ‘Carretas’.

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Example of Query Processing (II)

• The SQT query that represents the last query may be:

Select P.Cadastreid

From [http://www.uclm.es//prove.xml].CityModel.modelMember.Parcel as P,

[http://www.uclm.es//prove.xml].CityModel.modelMember.District as D

Where P.number > 100 and D.name like ‘Carretas’ and

P.extendOf.Contain.(D.extendOf)

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Example of Query Processing (III)

• After the decomposition process, this query generates the following operator tree shown below.

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Example of Query Processing (IV)

• The result set is a XML document with the totality of elements that have carried out all the conditions. For example:

<cadastreId>

3050

</cadastreId>

<cadastreId>

3008

</cadastreId>

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Index• Introduction

• Syntax of STQ

• Query Processing» Query Decomposition

» Operator Execution

• Example of Query Processing

• Conclusions

• Future Work

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Conclusions

• STQ: Spatial and temporal query language over XML.

• Spatio-Temporal feature is not included in the most widely-known XML query languages

• STQ is applied over a GML data model.

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Index• Introduction

• Syntax of STQ

• Query Processing» Query Decomposition

» Operator Execution

• Example of Query Processing

• Conclusions

• Future Work

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

Future Work

• Features such as Preserver order and Intelligence type coercion will be included

• Implementation of Dataguides:» Single user interface. » queries on the Web.

Gru

po d

e S

iste

mas d

e

Gru

po d

e S

iste

mas d

e

Info

rmació

n D

istrib

uid

oIn

form

ació

n D

istrib

uid

o

E-mail

• Questions and comments can be sent to the following e-mail address:

• corcoles@idr-ab.uclm.es

Recommended