 Copyright 2009 Digital Enterprise Research Institute. All rights reserved. Digital Enterprise Research Institute www.deri.ie RDF and XML: Towards a Unified.

Slides:



Advertisements
Similar presentations
Copyright 2009 Digital Enterprise Research Institute. All rights reserved. Digital Enterprise Research Institute Uniasdsd Dynamic querying.
Advertisements

CH-4 Ontologies, Querying and Data Integration. Introduction to RDF(S) RDF stands for Resource Description Framework. RDF is a standard for describing.
RDF Tutorial.
Semantic Web Introduction
 Copyright 2010 Digital Enterprise Research Institute. All rights reserved. Digital Enterprise Research Institute Transforming between RDF.
 Copyright 2004 Digital Enterprise Research Institute. All rights reserved. SPARQL Query Language for RDF presented by Cristina Feier.
™ Suggestions for Semantic Web Interfaces to Relational Databases Mike Dean W3C Workshop on RDF Access to Relational Databases Cambridge,
© 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice RDF and SOA David Booth, Ph.D. HP.
 Copyright 2008 Digital Enterprise Research Institute. All rights reserved. Digital Enterprise Research Institute Context Dependent Reasoning.
CSCI 572 Project Presentation Mohsen Taheriyan Semantic Search on FOAF profiles.
 Copyright 2005 Digital Enterprise Research Institute. All rights reserved. 1 The Architecture of a Large-Scale Web Search and Query Engine.
A year on the Semantic W3C (or: what is happening these days?) Semantic Web Meetup, Seattle, Ivan Herman, W3C.
COMP 6703 eScience Project Semantic Web for Museums Student : Lei Junran Client/Technical Supervisor : Tom Worthington Academic Supervisor : Peter Strazdins.
Axel Polleres Siemens AG Querying and Exchanging XML and RDF on the Web with XSPARQL (most slides taken from WWW’2012 Tutorial) This tutorial presents.
Semantic Web Andrejs Lesovskis. Publishing on the Web Making information available without knowing the eventual use; reuse, collaboration; reproduction.
Logics for Data and Knowledge Representation SPARQL Protocol and RDF Query Language (SPARQL) Feroz Farazi.
© 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Publishing data on the Web (with.
 Copyright 2009 Digital Enterprise Research Institute. All rights reserved Digital Enterprise Research Institute Semantic Search for CMS IKS.
1. Motivation Knowledge in the Semantic Web must be shared and modularly organised. The semantics of the modular ERDF framework has been defined model.
From SQL to SPARQL Symposium zur Pensionierung Prof. Wolfgang Panny Axel Polleres web:
Information Integration Intelligence with TopBraid Suite SemTech, San Jose, Holger Knublauch
Rajashree Deka Tetherless World Constellation Rensselaer Polytechnic Institute.
SPARQL All slides are adapted from the W3C Recommendation SPARQL Query Language for RDF Web link:
From Web 1.0  Web 3.0: Is RDF access to RDB enough? Vipul Kashyap Senior Medical Informatician, Clinical Informatics R&D Partners.
The SADI plug-in to the IO Informatics’ Knowledge Explorer...a quick explanation of how we “boot-strap” semantics...
Introduction to SPARQL. Acknowledgements This presentation is based on the W3C Candidate Recommendation “SPARQL Query Language for RDF” from
 Copyright 2008 Digital Enterprise Research Institute. All rights reserved. Digital Enterprise Research Institute Using/Extending RIF and.
 Copyright 2009 Digital Enterprise Research Institute. All rights reserved. Digital Enterprise Research Institute Can Semantics catch up with.
The Semantic Web Web Science Systems Development Spring 2015.
Chapter 3 Querying RDF stores with SPARQL. Why an RDF Query Language? Why not use an XML query language? XML at a lower level of abstraction than RDF.
Copyright © Orbeon, Inc. All rights reserved. Erik Bruchez Applications of XML Pipelines XML Prague, June 16 th, 2007.
Ultrawrap: SPARQL Execution on Relational Data Juan F. Sequeda, Daniel P. Miranker University of Texas - Austin ISWC 2009 Seoul National University Internet.
 Copyright 2009 Digital Enterprise Research Institute. All rights reserved. Digital Enterprise Research Institute Linked Broken Data? Dr Axel.
Relational Databases to RDF (a.k.a RDB2RDF) Juan F. Sequeda Dept of Computer Science University of Texas at Austin.
Master Informatique 1 Semantic Technologies Part 11Direct Mapping Werner Nutt.
SPARQL W3C Simple Protocol And RDF Query Language
Supported by EU projects 12/12/2013 Athens, Greece Open Data in Agriculture Hands-on with data infrastructures that can power your agricultural data products.
SPARQL AN RDF Query Language. SPARQL SPARQL is a recursive acronym for SPARQL Protocol And Rdf Query Language SPARQL is the SQL for RDF Example: PREFIX.
Logics for Data and Knowledge Representation SPARQL -- Exercises Feroz Farazi.
1 Lessons from the TSIMMIS Project Yannis Papakonstantinou Department of Computer Science & Engineering University of California, San Diego.
 Copyright 2007 Digital Enterprise Research Institute. All rights reserved. Digital Enterprise Research Institute Scalable Authoritative OWL.
Towards a semantic web Philip Hider. This talk  The Semantic Web vision  Scenarios  Standards  Semantic Web & RDA.
Life in Standard(isation) bodies… … some very subjective experiences.
Grid Computing & Semantic Web. Grid Computing Proposed with the idea of electric power grid; Aims at integrating large-scale (global scale) computing.
 Copyright 2009 Digital Enterprise Research Institute. All rights reserved. Digital Enterprise Research Institute Reasoning and Querying for.
1 SPARQL A. Emrah Sanön. 2 RDF RDF is quite committed to Semantic Web. Data model Serialization by means of XML Formal semantics Still something is missing!
Semantic Technologies and Application to Climate Data M. Benno Blumenthal IRI/Columbia University CDW /04-01.
OWLED 2008 DC Use of OWL and SWRL for Semantic Relational Database Translation Matthew Fisher, Mike Dean, Greg Joiner {mdean, April 1.
ESIP Semantic Web Products and Services ‘triples’ “tutorial” aka sausage making ESIP SW Cluster, Jan ed.
05/01/2016 SPARQL SPARQL Protocol and RDF Query Language S. Garlatti.
RDF David R Newman 15 May 2009.
 XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,
Chapter 04 Semantic Web Application Architecture 23 November 2015 A Team 오혜성, 조형헌, 권윤, 신동준, 이인용.
Stream Reasoning with Linked Data Open Data Open Day 2013 Sina Samangooei, Nick Gibbins 26 June 2013.
Semantic Web in Depth SPARQL Protocol and RDF Query Language Dr Nicholas Gibbins –
Semantic metadata in the Catalogue Frédéric Houbie.
Master Informatique 1 Semantic Web Technologies Part 0Course Organization Semantic Web Technologies Werner Nutt.
BBY 464 Semantic Information Management (Spring 2016) Semantic Query Languages Yaşar Tonta & Orçun Madran [yasartonta, Hacettepe.
SPARQLing SERVICES Leigh Dodds Engineering Manager, Ingenta XTech, May 2006.
1 RDF Storage and Retrieval Systems Jan Pettersen Nytun, UiA.
OWL (Ontology Web Language and Applications) Maw-Sheng Horng Department of Mathematics and Information Education National Taipei University of Education.
RDF and RDB 1 Some slides adapted from a presentation by Ivan Herman at the Semantic Technology & Business Conference, 2012.
Introduction to SPARQL
SPARQL SPARQL Protocol and RDF Query Language
Middleware independent Information Service
Logics for Data and Knowledge Representation
LOD reference architecture
CC La Web de Datos Primavera 2018 Lecture 8: SPARQL [1.1]
RDF David R Newman 15 July 2009.
Logics for Data and Knowledge Representation
Presentation transcript:

 Copyright 2009 Digital Enterprise Research Institute. All rights reserved. Digital Enterprise Research Institute RDF and XML: Towards a Unified Query Layer Nuno Lopes, Stefan Bischof, Orri Erling, Axel Polleres, Alexandre Passant, Diego Berrueta, Antonio Campos, Jérôme Euzenat, Kingsley Idehen, Stefan Decker, Stéphane Corlosquet, Jacek Kopecky, Janne Saarela, Thomas Krennwallner, Davide Palmisano, and Michal Zaremba (supporters of the W3C member submission) 1

Digital Enterprise Research Institute Semantic Data Access… … that would be the vision RDF: common simple Data format underlying the Semantic Web 2 RDBMS Rules (RIF)Ontologies (OWL2) Queries (SPARQL1.1) idid FNAM E LNAM E AG E 1BobMcBob42 2JohnJohnso n 24 3SteveSmith38 3PO R2D Obiwan Luke Use the force

Digital Enterprise Research Institute 3 RDBMS 3PO R2D Obiwan Luke Use the force RulesOntologies Queries a “Bob McBob”. … a “3PO”... a “Obiwan Kenobi”... … a “Axel Polleres”. idid FNAM E LNAM E AG E 1BobMcBob42 2JohnJohnso n 24 3SteveSmith38 Semantic Data Access… … that would be the vision

Digital Enterprise Research Institute Query (SPARQL): “Give me all Persons” SELECT ?X WHERE { ?X a } Ontologies (OWL2, DL ): “ is a subclass of ” Rules (RIF, LP ): “ who never sent binary are Persons” 4 Rules (RIF) Ontologies (OWL2) Queries (SPARQL) a “Bob McBob”. a “3PO”... a “Obiwan Kenobi”... a “Axel Polleres”. a Semantic Data Access… … that would be the vision

Digital Enterprise Research Institute Bridging Gaps to the data “below”: 5 RDBMS Rules (RIF) Queries Ontologies (OWL) XQuery/XSLT (GRDDL) SQL (RDB2RDF) (SPARQL) Can’t we just query “in one go”?

Digital Enterprise Research Institute Our starting motivation (2008): 6 SOAP/WSDL RSS HTML SPARQL XSLT/XQuery XSPARQL 6

Digital Enterprise Research Institute Example: 7

Digital Enterprise Research Institute So, why are XSLT, XQuery not enough? Because RDF ≠ RDF/XML !!! 1) many different RDF/XML representations… 2) … and actually a lot of RDF data residing in RDF stores, accessible via SPARQL endpoints already, rather than in RDF/XML 8

Digital Enterprise Research Institute Our approach: XSPARQL (W3C submission) New query language… but don’t reinvent! XQuery + SPARQL = XSPARQL 9

Digital Enterprise Research Institute Example: Mapping from RDF to XML 10 { for $Person $Name from where { $Person foaf:name $Name } order by $Name return {for $FName from where { $Person foaf:knows $Friend. $Person foaf:name $Name. $Friend foaf:name $Fname } return {$FName} }

Digital Enterprise Research Institute Example: Adding value generating functions to SPARQL construct { :me foaf:knows _:b. _:b foaf:name {fn:concat("""",?N," ",?F,"""”)} } from where { ?ADDR vc:Given ?N. ?ADDR vc:Family ?F. } … :me foaf:knows _:b1. _:b1 foaf:name “Peter Patel-Schneider”. :me foaf:knows _:b2. _:b2 foaf:name “Stefan Decker”. :me foaf:knows _:b3. _:b3 foaf:name “Thomas Eiter”. … 11

Digital Enterprise Research Institute Implementation and semantics: Formal Semantics (XSPARQL1.0):  Based on XQuery formal Semantics  Can be implemented based on rewriting to XQuery Challenges/Limitations:  Nesting, scope of RDF dataset…  different “type systems” of RDF/XML (sequences)  adding ontological inference (to resolve heterogeneities)  We are working on this in XSPARQL1.1! 12

Digital Enterprise Research Institute Formal Semantics: Initial idea (and formalised in XSPARQL1.0):  extension of the XQuery semantics by plugging in SPARQL semantics in a modular way  Rewriting algorithm is defined for embedding XSPARQL into native XQuery plus interleaved calls to a SPARQL endpoint 13

Digital Enterprise Research Institute Rewriting XSPARQL to XQuery… 14 construct { _:b foaf:name {fn:concat("""",$N," ",$F,"""")} } from where { $P vc:Given $N. $P vc:Family $F. } let $aux_query := fn:concat(" fn:encode-for-uri( "select $P $N $F from where {$P vc:Given $N. $P vc:Family $F.}")) for $aux_result at $aux_result_pos in doc($aux_query)//sparql_result:result let $P_Node := let $N_Node := let $F_Node := let $N := data($N_Node/*)let $N_NodeType := name($N_Node/*) let $N_RDFTerm := local:rdf_term($N_NodeType,$N)... return ( fn:concat("_:b",$aux_result_pos," foaf:name "), ( fn:concat("""",$N_RDFTerm," ",$F_RDFTerm,"""") ), "." ) 1. Encode SPARQL in HTTP call SELECT Query 2. Execute call, via fn:doc function 3. Collect results from SPARQL result format(XML) 4. construct becomes return that outputs triples.

Digital Enterprise Research Institute Formalisation Current formalisation embeds rewriting in the functional semantics of XQuery: mapping rules [·] Expr' inherit from the definitions of XQuery's [·] Expr 15

Digital Enterprise Research Institute Ongoing work/Outlook: Simple rewriting semantics has some limitations, which we are currently working on:  Adding RDFS/OWL entailment(and other SPARQL1.1 features)  Integrate RDB Querying (SQL), Json, etc.  Optimisations…  Nesting,scope of RDF dataset…  Different “type systems” of RDF/XML (sequences)… 16 SPARQL1. 1 Integrated engine(s) RDB Json?

Digital Enterprise Research Institute Use as an RDB2RDF exporter… RDB Querying sketch prefix foaf: for p1.name as $x, p2.name as $y from person as p1, person as p2, relation as r where { p1.name = r.person and p2.name = r.knows } construct { $x foaf:knows $y } RDBForClause to specify input from RDB tables SQL Where pattern Output RDF (or XML) Extract foaf:knows relations from a RDB with two tables: containing persons and their knows relations 17 Unified RDF/XML/RDB Query Layer = XSPARQL + RDB2RDF ?

Digital Enterprise Research Institute Optimisations – Example: E.g. dependent Join… i.e. 18 { for $Person $Name from where { $Person foaf:name $Name } order by $Name return {for $Fname where { $Person foaf:knows $Friend. $Friend foaf:name $Fname } return {$FName} } { let $aux := select $Person $Name $FName from where { $Person foaf:name $Name. $Person foaf:knows $Friend. $Friend foaf:name $Fname } for $Name in $aux.Name return { for $FName in $aux.Fname where $aux.Name = $Name return {$FName} } Only one SPARQL query

Digital Enterprise Research Institute Enable optimisation across layers query each source format in native language instead of multistep transformation via “narrow“ interfaces (e.g. SPARQL  SPARQL-Resuly/XML  Xquery/XSLT) Enable declarative view (a la Relational Algebra for core fragment of the language) Tighter integration of various source formats that populate the (Semantic) Web This needs a cross-activity effort in W3C? Semantic Web + XML + others? RDBMS Rules (RIF) Queries Ontologies (OWL) (SPARQL) Summary: One Unified RDF/XML/RDB Query Layer to combine XQuery+SPARQL+GRDDL+SQL ?

Digital Enterprise Research Institute Nesting,scope of RDF dataset… 20 { for $Person $Name from where { $Person foaf:name $Name } order by $Name return {for $FName from where { $Person foaf:knows $Friend. $Person foaf:name $Name. $Friend foaf:name $Fname } return {$FName} } Remember the query from before…. We were slightly cheating:

Digital Enterprise Research Institute Nesting,scope of RDF dataset… The nested query should be over the same Dataset as the outer query, bindings to bnodes should be preserved Two separate, independent SPARQL calls don’t work anymore Solution: We need to add Dataset to the dynamic environment in the semantics. We need a special SPARQL implementation that allows several calls to the same active graph. 21 { for $Person $Name from where { $Person foaf:name $Name } order by $Name return {for $FName where { $Person foaf:knows $Friend. $Friend foaf:name $Fname } return {$FName} } Remember the query from before…. This is what one would rather expect

Digital Enterprise Research Institute Different “type systems” of RDF/XML (e.g. sequences)… Social Graph queries a la [1]: Mauro San Martín, Claudio Gutierrez: Representing, Querying and Transforming Social Networks with RDF/SPARQL. ESWC 2009: prefix foaf: prefix dc: let $ds := for * from where { $pub dc:creator [] } construct { { for * from $pub where { $p dc:creator $o. } construct {$p dc:creator } } } let $allauthors := distinct-values(for $o from $ds where {$p dc:creator $o} order by $o return $o) for $auth at $auth_pos in $allauthors for $coauth in $allauthors[position() > $auth_pos] let $commonPubs := count( { for $pub from $ds where { $pub dc:creator $auth, $coauth } return $pub } ) where ($commonPubs > 0) construct { [ :author1 $auth; :author2 $coauth; :commonPubs $commonPubs ] } Assignment of graphs to variables needs new datatype RDFGraph Nested CONSTRUCTs queries Lists of RDFTerms need new datatype RDFTerm Give me all pairs of co-authors and their joint publications.

Digital Enterprise Research Institute Use: SIOC-2-RSS XSPARQL+SIOC enables customised RSS export: 23 {for $name from where { [a sioc:Forum] sioc:name $name } return $name} {for $seeAlso from where { [a sioc:Forum] sioc:container_of [rdfs:seeAlso $seeAlso] } return {for $title $descr $date from $seeAlso where { [a sioc:Post] dc:title $title ; sioc:content $descr; dcterms:created $date } return $title $descr $date } “Great stuff,... I have not seen any SIOC to RSS xslt examples or vice versa” (John Breslin, creator of SIOC) RSS2.0

Digital Enterprise Research Institute Use: Generate KML from FOAF+Geo: 24 XSPARQL+FOAF and GEO data enables KML map data: e foaf:name “Stefan Decker” foaf:locatedIn geo:lat geo:lat More: { for $person $name $long $lat from where { $person; foaf:name $name; foaf:based_near [ geo:long $long; geo:lat $lat ] } return {fn:concat("Location of ", $name)} {fn:concat($long, ",", $lat, ",0")} }