280 likes | 447 Views
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.
E N D
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 • Introduction • STQ Syntax • Query Processing • Query Decomposition • Operator Execution • Example of Query Processing • Conclusions • Future Work
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)
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
Index • Introduction • Syntax of STQ • Query Processing • Query Decomposition • Operator Execution • Example of Query Processing • Conclusions • Future Work
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
Syntax of STQ (I) 1. Clean Semantics Select C.modelMember.Parcel.cadastreId From [http://www.uclm.es//prove.xml].CityModel as C Where C.name Like ‘Albacete’ 2. Path Expressions C.modelMember.Parcel
Syntax of STQ (II) 3. Ability to return an XML document Select 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>
Syntax of STQ (III) • 4. Ability to query and return XML tags and attributes • Select M.Parcel.extendOf • From [http://www.uclm.es//probe.xml].CityMode.modelMember as M • Where M.(street%) Like ‘Capitan Grant’ • 5. Intelligence type coercion (String-Integer).
Syntax of STQ (IV) 6. Handles unexpected data 7. Ability to allow queries when the DTD is not fully known Select C From [http://www.uclm.es//prove.xml].CityModel as C Where C.(name | description) Like ‘Albacete’
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
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
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
Index • Introduction • Syntax of STQ • Query Processing • Query Decomposition • Operator Execution • Example of Query Processing • Conclusions • Future Work
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)
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)
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.
Index • Introduction • Syntax of STQ • Query Processing • Query Decomposition • Operator Execution • Example of Query Processing • Conclusions • Future Work
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’.
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)
Example of Query Processing (III) • After the decomposition process, this query generates the following operator tree shown below.
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>
Index • Introduction • Syntax of STQ • Query Processing • Query Decomposition • Operator Execution • Example of Query Processing • Conclusions • Future Work
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.
Index • Introduction • Syntax of STQ • Query Processing • Query Decomposition • Operator Execution • Example of Query Processing • Conclusions • Future Work
Future Work • Features such as Preserver order and Intelligence type coercion will be included • Implementation of Dataguides: • Single user interface. • queries on the Web.
E-mail • Questions and comments can be sent to the following e-mail address: • corcoles@idr-ab.uclm.es