Translating WFS Query to SQL/XML Query Vânia Vidal Fernando Lemos Fábio Feitosa Departamento de Computação Universidade Federal do Ceará

Slides:



Advertisements
Similar presentations
Access control for geospatial information objects using/extending the eXtensible Access Control Markup Language Andreas Matheus, Technische Universität.
Advertisements

Center for Informatics Federal University of Pernambuco (Cin/UFPE) Towards a Web Service for Geographic and Multidimensional Processing Joel da.
Towards Automatic Feature Type Publication Vânia M. P. Vidal, Marcel Teixeira, Fábio Feitosa Universidade Federal do Ceará – UFC.
The Next Generation Network Enabled Weather (NNEW) SWIM Application Asia/Pacific AMHS/SWIM Workshop Chaing Mai, Thailand March 5-7, 2012 Tom McParland,
Querying on the Web: XQuery, RDQL, SparQL Semantic Web - Spring 2006 Computer Engineering Department Sharif University of Technology.
XML: Extensible Markup Language
Proposed update of Technical Guidance for INSPIRE Download services based on SOS Matthes Rieke, Dr. Albert Remke (m.rieke, 52°North.
Object Relational Model Spatial Queries. Query Model Spatial Layer Data Table where coordinates are stored Primary Filter Spatial Index Index retrieves.
1 OGC Web Services Kai Lin San Diego Supercomputer Center
CSE 6331 © Leonidas Fegaras XML and Relational Databases 1 XML and Relational Databases Leonidas Fegaras.
TIMBER A Native XML Database Xiali He The Overview of the TIMBER System in University of Michigan.
Relational Databases for Querying XML Documents: Limitations & Opportunities VLDB`99 Shanmugasundaram, J., Tufte, K., He, G., Zhang, C., DeWitt, D., Naughton,
Name: Jim Jones Making the Web of Data Available via Web Feature Services Jim Jones, Werner Kuhn, Carsten Keßler and Simon Scheider
GeoSciML Implementation by Agnès Tellez-Arenas. GeoSciML implementation 1. First step: data mapping preparation of the services WMS,WFS Data Specification.
Europe’s Information Society eContentplus OrléansWP6 1st Coordination and progress meeting Technical information OGC WMS – WFS – CSW.
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 28 Database Systems I The Relational Data Model.
NDFD Technical Workshop (Nov 2, 2006) 1 GIS Web Services NDFD Technical Workshop November 2, 2006 John Schattel -
Ling Wang, Mukesh Mulchandani Advisor: Elke A. Rundensteiner Rainbow Research group, DSRG, WPI Updating XQuery Views over Relational Data.
1 COS 425: Database and Information Management Systems XML and information exchange.
XML –Query Languages, Extracting from Relational Databases ADVANCED DATABASES Khawaja Mohiuddin Assistant Professor Department of Computer Sciences Bahria.
Copyright © 2006, Open Geospatial Consortium, Inc., All Rights Reserved. The OGC and Emergency Services: GML for Location Transport & Formats & Mapping.
GIS on the Web. World Wide Web Internet Clients Servers FTP Opportunity in Web- based Mapping Disaster relief and Emergency management Global and.
Web Feature Service and Web Map Service WATER FOR A HEALTHY COUNTRY FLAGSHIP SISS Workshop v2.3 Pavel Golodoniuc, Josh Vote 8 May 2013.
TIBCO Designer TIBCO BusinessWorks is a scalable, extensible, and easy to use integration platform that allows you to develop, deploy, and run integration.
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Akhila Kondai October 30, 2013.
XML-to-Relational Schema Mapping Algorithm ODTDMap Speaker: Artem Chebotko* Wayne State University Joint work with Mustafa Atay,
Information storage: Introduction of database 10/7/2004 Xiangming Mu.
Selective and Authentic Third-Party distribution of XML Documents - Yashaswini Harsha Kumar - Netaji Mandava (Oct 16 th 2006)
U.S. Department of the Interior U.S. Geological Survey NWIS, STORET, and XML National Water Quality Monitoring Council August 20, 2003.
Lecture 21 XML querying. 2 XSL (eXtensible Stylesheet Language) In HTML, default styling is built into browsers as tag set for HTML is predefined and.
XML in SQL Server Overview XML is a key part of any modern data environment It can be used to transmit data in a platform, application neutral form.
Model-Driven Web Feature Service A Way Towards Enhanced Semantic Interoperability Peter Staub, ETH Zurich FOSS4G 2007 – Victoria B.C., September 26, 2007.
Web Feature Service – What and How? Ian Painter - Snowflake Software.
David Blasby The Open Planning Project New York. Goals Explain what a WFS and WMS are, and when to use them Be able to create simple spatial web applications.
AIXM Users’ Conference, March Implementing AIXM in Instrument Flight Procedures Automation Presenter: Iain Hammond MacDonald, Dettwiler &
PostgreSQL and relational databases As well as assignment 4…
U.S. Department of the Interior U.S. Geological Survey NWIS, STORET, and XML Advisory Committee on Water Information September 10, 2003 Kenneth J. Lanfear,
Querying Structured Text in an XML Database By Xuemei Luo.
Source Description-based Approach for the Modeling of Spatial Information Integration Yoshiharu Ishikawa and Hiroyuki Kitagawa University of Tsukuba
RELATIONAL FAULT TOLERANT INTERFACE TO HETEROGENEOUS DISTRIBUTED DATABASES Prof. Osama Abulnaja Afraa Khalifah
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation Exam and Lecture Overview.
RRXS Redundancy reducing XML storage in relations O. MERT ERKUŞ A. ONUR DOĞUÇ
Pusan National University, Korea Joon-Seok Kim Taehoon Kim Ki-Joune Li.
Mapping the IntesaGIS model to the EuroRoads model Alberto Belussi Università di Verona Giuseppe Pelagatti, Mauro Negri Politecnico di Milano ESDI Workshop.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Copyright© 2005 Oracle Corp.1 SQL/XML Jim Melton USA: Oracle Corp. JTC1 SC32N1632.
XML and Database.
Review of Paper: Johan Hjelm “Position dependent services using metadata profile matching” Youyong Zou Apr.15,2001.
Benjamin Post Cole Kelleher.  Availability  Data must maintain a specified level of availability to the users  Performance  Database requests must.
INRIA - Progress report DBGlobe meeting - Athens November 29 th, 2002.
Issues in Ontology-based Information integration By Zhan Cui, Dean Jones and Paul O’Brien.
Dec. 13, 2002 WISE2002 Processing XML View Queries Including User-defined Foreign Functions on Relational Databases Yoshiharu Ishikawa Jun Kawada Hiroyuki.
Semantic Interoperability in GIS N. L. Sarda Suman Somavarapu.
Module 5: Managing Content. Overview Publishing Content Executing Reports Creating Cached Instances Creating Snapshots and Report History Creating Subscriptions.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
Vers national spatial data infrastructure training program Serving Your Data Via WFS Serving Transportation Data Through the NSDI.
® Sponsored by SOS 2.0 Profile For Hydrology 90th OGC Technical Committee Washington, DC Michael Utech 26 March 2014 Copyright © 2014 Open Geospatial Consortium.
The Next Generation Network Enabled Weather (NNEW) SWIM Application
XML: Extensible Markup Language
making ogc's wfs specification mash-up friendly
Chapter 2: Intro to Relational Model
Using Postgres/PostGIS for WFSRI
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment.
SilkRoute: A Framework for Publishing Rational Data in XML
Chapter 2: Intro to Relational Model
Chapter 8 Advanced SQL.
and perspectives for AIXM
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment Pearson Education © 2009.
Presentation transcript:

Translating WFS Query to SQL/XML Query Vânia Vidal Fernando Lemos Fábio Feitosa Departamento de Computação Universidade Federal do Ceará

Outline WFS Specification Contributions Feature Type Specification Extension of Feature Type Translating WFS Query to SQL/XML Query Conclusions

WFS Specification OpenGis Consortium promotes the development and use of advanced open system standards and techniques in the geoprocessing area and related information technologies WFS publishes GML views of geographic features stored in data sources users can query and update data stores through a feature type schema

WFS Specification WFS request GetCapabilities DescribeFeatureType GetFeature Transaction LockFeature

Contributions Correspondence Assertions specify the mappings between feature type schemas and relational schemas TranslateWFSQuery Algorithm translates a WFS query over a feature type schema into a SQL/XML query over the relational schema translation is based on the correspondence assertions

WFS GetFeature Request Deegree WFS Server BDR WFS Query SQL Query Q 1 result of Q 1 GML Deegree WFS Our approach GML Publisher WFS Server BDR WFS Query SQL/XML Query GML SQL Query Q n result of Q n … …

Feature Type Specification Feature Type F over a relational schema S F = where T is the XML Schema type for feature instances R is the name of the master relation schema, which contains the geometric attribute A is the set of correspondence assertions, which fully specifies T in terms of R

Example Relational Schema DB_Station XML Schema type for Feature Type F_Station Master Relation Schema

Correspondence Assertions of F_Station Master Relation Schema

Extension of a Feature Type Extension of F = for an instance s of schema S a sequence of F-elements of type T, such that each F-element matches a tuple of s (R) F = { $f | $f is an instance of T and r s (R) such that $f A r} SQL/XML query definition of an extension of F F = SELECT XMLELEMENT( "Extension_of_F ", XMLAGG( XMLELEMENT( "F", [R T](r) )) FROM R r [R T](r) constructs the content for an instance $f of T such that $f A r as specified by the CAs of F

SQL/XML Definition for Extension of F_Station SELECT XMLELEMENT( " Extension_of_F_Station ", XMLAGG( XMLELEMENT( " F_Station ", XMLFOREST( S.CODE AS " code "), XMLFOREST( SDO_UTIL.TO_GMLGEOMETRY(S.GEOM_POINT) AS " geometry "), XMLFOREST( S.NAME AS " name "), XMLELEMENT( " address ", XMLFOREST( S.STREET AS " street "), XMLELEMENT( " city ", (SELECT XMLCONCAT( XMLFOREST( C.NAME AS " name "), XMLFOREST( C.AREA AS " area ")) FROM City_rel C WHERE C.CODECITY = S.CODECITY) ), XMLFOREST( S.ZIPCODE AS " zipcode ") ), (SELECT XMLAGG(XMLELEMENT( " pluviometry ", XMLFOREST( PL.MONTH AS " month "), XMLFOREST( PL.VALUE AS " value ") ) ) FROM Pluviometry_rel PL WHERE S.CODE = PL.CODESTATION), XMLFOREST( (SELECT A.NAME FROM Agency_rel A WHERE A.CODEAGENCY = S.CODEAGENCY) AS " agency ") ) ) ) FROM Station_rel S; [TStation / code] [ Station_rel / CODE] [TStation / geometry] [ Station_rel / GEOM_POINT] [TStation / name] [ Station_rel / NAME] [TStation / address] [ Station_rel / NULL] [TAddress / street] [ Station_rel / STREET] [TAddress / city] [ Station_rel / FK 1 ] [TCity / name] [ City_rel / NAME] [TCity / area] [ City_rel / AREA] [TAddress / zipcode] [ Station_rel / ZIPCODE] [TStation / pluviometry] [ Station_rel / FK 2 -1 ] [TPluviometry / month] [ Pluviometry_rel / MONTH] [TPluviometry / area] [ Pluviometry_rel / AREA] [TStation / agency] [ Station_rel / FK 3 / NAME]

An Instance of DB_Station

Extension of F_Station

WFS Query element of a GetFeature request: delivers feature instances of a given feature type, where each feature instance matches a tuple of the Master Table element contains: a mandatory attribute typeName used to indicate the name of the feature type to be queried a sequence of zero or more elements used to specify what properties to retrieve the value of each element is an XPath expression that references a property or sub-property of the relevant feature type an optional element used to define spatial and non-spatial constraints on a query encoded as described in the OGC Filter Encoding Implementation Spec

Q W : WFS Query over F_Station Q X : Canonical XQuery for Q W The result of Q w is the result of evaluating Q X on an extension of F_Station

XML fragment resulting from Q W Q W : WFS Query

WFS Query Definition: Let Q W be a WFS Query over feature type F Qx be the canonical XQuery for Q W Q S be a SQL/XML query over S which returns a set of elements. Then, we say that Q S is a correct translation for Q W iff, for any instance S of S, if F is the extension of F on S S 1 is the set of elements resulting from evaluating Q S on S and S 2 is the set of elements resulting from evaluating Q X on F then S 1 = S 2

Input: WFS query Q W Output: SQL/XML query Q S Let := TranslateFilter( f ), where f is the filter of Q W In case of Case 1: Q W has no elements Q s = SELECT XMLELEMENT( "gml:featureMember", XMLELEMENT( "F", [R T][r] ) ) FROM R r, L WHERE P TranslateWFSQuery Algorithm

Case 2: Q W has n elements Let Path i be the value of i-th element of Q W. Let Q i [r] := TranslatePath(Path i ) Q s = SELECT XMLELEMENT( " gml:featureMember ", XMLELEMENT( " F ", Q 1 [r] … Q n [r] ) ) FROM R r, L WHERE P TranslateWFSQuery Algorithm

TranslateFilter( f ) returns a tuple where P is an SQL conditional expression L is a list of relations names required to process P such that, for any instance $t of T if $t A r, where r is a tuple of R, then $t satisfies f iff r satisfies P

TranslatePath( F ) Algorithm Input:a path F = p 1 /…/ p n of type T Output: SQL/XML subquery Q[r] that computes the value of path F Theorem: For any instance $t of Extension of F, where $t A r, then Q[r] returns a set S of p n - elements where S = $t / p 1 /…/ p n

Q W : WFS Query Q X : Canonical XQuery for Q W Translation for Q W

SELECT XMLELEMENT("gml:FeatureMember", XMLELEMENT(" Station ", Q 1 [S], …..………………….. TranslatePath ( name ) Q 2 [S], …… TranslatePath ( address / city) Q 3 [S], …………….………… TranslatePath ( pluviometry ) Q 4 [S] ………………………….. TranslatePath ( geometry ) ) ) FROM Station_rel S, L WHERE P Translation for Q W SQL/XML Query

TranslatePath( name ) [TStation / name] [Station_rel / NAME] Translation for Q W SQL/XML Query SELECT XMLELEMENT("gml:FeatureMember", XMLELEMENT(" Station ") XMLFOREST( S.NAME AS " name "), Q 2 [S], Q 3 [S], Q 4 [S] ) FROM Station_rel S, L WHERE P

SELECT XMLELEMENT("gml:FeatureMember", XMLELEMENT(" Station ") XMLFOREST( S.NAME AS " name "), XMLELEMENT( " city ", (SELECT XMLCONCAT( XMLFOREST( C.NAME AS " name "), XMLFOREST( C.AREA AS " area ") ) FROM City_rel C WHERE C.CODECITY = S.CODECITY)), Q 3 [ S ], Q 4 [ S ] ) FROM Station_rel S, L WHERE P TranslatePath( address / city ) [TStation / address] [Station_rel / NULL] + [TAddress / city] [Station_rel / FK 1 ] + [TCity / name] [City_rel / NAME] + [TCity / area] [City_rel / AREA] Translation for Q W SQL/XML Query

SELECT XMLELEMENT("gml:FeatureMember", XMLELEMENT(" Station ") XMLFOREST( S.NAME AS " name "), XMLELEMENT( " city ", (SELECT XMLCONCAT( XMLFOREST( C.NAME AS " name "), XMLFOREST( C.AREA AS " area ") ) FROM City_rel C WHERE C.CODECITY = S.CODECITY)), (SELECT XMLAGG(XMLELEMENT("pluviometry", XMLFOREST(PL.MONTH AS "month"), XMLFOREST(PL.VALUE AS "value") ) ) FROM Pluviometry_rel PL WHERE S.CODE = PL.CODESTATION), Q[ S ] ) FROM Station_rel S, L WHERE P TranslatePath( pluviometry ) [TStation / pluviometry] [Station_rel / FK 2 -1 ] + [TPluviomety / month] [Pluviometry_rel / MONTH] + [TPluviomety / value] [Pluviometry_rel / VALUE] Translation for Q W SQL/XML Query

SELECT XMLELEMENT("gml:FeatureMember", XMLELEMENT(" Station ") XMLFOREST( S.NAME AS " name "), XMLELEMENT( " city ", (SELECT XMLCONCAT( XMLFOREST( C.NAME AS " name "), XMLFOREST( C.AREA AS " area ") ) FROM City_rel C WHERE C.CODECITY = S.CODECITY)), (SELECT XMLAGG(XMLELEMENT(" pluviometry ", XMLFOREST( PL.MONTH AS " month "), XMLFOREST( PL.VALUE AS " value ") ) ) FROM Pluviometry_rel PL WHERE S.CODE = PL.CODESTATION), XMLFOREST( SDO_UTIL.TO_GMLGEOMETRY(S.GEOM_POINT) AS " geometry ") ) FROM Station_rel S, L WHERE P TranslatePath( geometry ) [TStation / geometry] [Station_rel / GEOM_POINT] Translation for Q W SQL/XML Query

SELECT XMLELEMENT("gml:FeatureMember", XMLELEMENT(" Station ") XMLFOREST( S.NAME AS " name "), XMLELEMENT( " city ", (SELECT XMLCONCAT( XMLFOREST( C.NAME AS " name "), XMLFOREST( C.AREA AS " area ") ) FROM City_rel C WHERE C.CODECITY = S.CODECITY)), (SELECT XMLAGG(XMLELEMENT(" pluviometry ", XMLFOREST( PL.MONTH AS " month "), XMLFOREST( PL.VALUE AS " value ") ) ) FROM Pluviometry_rel PL WHERE S.CODE = PL.CODESTATION), XMLFOREST( SDO_UTIL.TO_GMLGEOMETRY(S.GEOM_POINT) AS " geometry ") ) FROM Station_rel S, Agency_rel A WHERE S.CODEAGENCY = A.CODEAGENCY AND A.NAME = 'FUNCEME' AND mdsys.sdo_relate( S.GEOM_POINT, mdsys.sdo_geometry(2003, NULL, NULL, mdsys.sdo_elem_info_array(1, 1003, 3), mdsys.sdo_ordinate_array(-5.2, -42.5, –2.5, -38.7)), 'mask=ANYINTERACT querytype=WINDOW') = 'TRUE' := TraslateFilter( f ) SQL/XML Query Translation for Q W

TranslateWFSQuery Algorithm Theorem: Let Q w be a WFS Query over F Q X be a canonical XQuery for Q W Q S be a SQL/XML query over S generated by TranslateWFSQuery S 1 be a set of elements resulting from Q X on F S 2 be a set of elements resulting from Q S on S Then S 1 = S 2

Conclusions Contributions: a formalism to specify the mapping between a feature type schema and a relational database schema an algorithm that translates a WFS query over a feature type schema into a SQL/XML query over the relational database schema, based on feature type's correspondence assertions. Future work: development of GML Publisher, a framework for publishing geographic data stored in relational databases as GML