integrating heterogeneous data by extending semantic web standards

140
Integrating Heterogeneous Data by Extending Semantic Web Standards Nuno Lopes 26 November, 2012

Upload: nunoalexandrelopes

Post on 18-Dec-2014

339 views

Category:

Technology


0 download

DESCRIPTION

My PhD VIVA presentation entitled "Integrating Heterogeneous Data by Extending Semantic Web Standards"

TRANSCRIPT

Page 1: Integrating Heterogeneous Data by Extending Semantic Web Standards

Integrating Heterogeneous Data by ExtendingSemantic Web Standards

Nuno Lopes

26 November, 2012

Page 2: Integrating Heterogeneous Data by Extending Semantic Web Standards

Data Integration: Pizza Delivery Company

RDB

Clients/ Ordersperson addressNuno Galway

Deliveries

XML

Clients/ Orders

XML

<person>

<name>Nuno</name>

<address>Dublin</address>

</person>

RDF

How many pizzas were delivered toNuno’s home during his PhD?

2012

From 2008 to 2012

1 / 24

Page 3: Integrating Heterogeneous Data by Extending Semantic Web Standards

Data Integration: Pizza Delivery Company

RDB

Clients/ Ordersperson addressNuno Galway

Deliveries

XML

Clients/ Orders

XML

<person>

<name>Nuno</name>

<address>Dublin</address>

</person>

RDF

How many pizzas were delivered toNuno’s home during his PhD?

2012

From 2008 to 2012

1 / 24

Page 4: Integrating Heterogeneous Data by Extending Semantic Web Standards

Data Integration: Pizza Delivery Company

RDB

Clients/ Ordersperson addressNuno Galway

Deliveries

XML

Clients/ Orders

XML

<person>

<name>Nuno</name>

<address>Dublin</address>

</person>

RDF

How many pizzas were delivered toNuno’s home during his PhD?

2012

From 2008 to 2012

1 / 24

Page 5: Integrating Heterogeneous Data by Extending Semantic Web Standards

Data Integration: Pizza Delivery Company

RDB

Clients/ Ordersperson addressNuno Galway

Deliveries

XML

Clients/ Orders

XML

<person>

<name>Nuno</name>

<address>Dublin</address>

</person>

RDF

How many pizzas were delivered toNuno’s home during his PhD?

2012

From 2008 to 2012

1 / 24

Page 6: Integrating Heterogeneous Data by Extending Semantic Web Standards

Data Integration: Pizza Delivery Company

RDB

Clients/ Ordersperson addressNuno Galway

Deliveries

XML

Clients/ Orders

XML

<person>

<name>Nuno</name>

<address>Dublin</address>

</person>

RDF

How many pizzas were delivered toNuno’s home during his PhD?

2012

From 2008 to 2012

1 / 24

Page 7: Integrating Heterogeneous Data by Extending Semantic Web Standards

Data Integration: Pizza Delivery Company

RDB

Clients/ Ordersperson addressNuno Galway

Deliveries

XML

Clients/ Orders

XML

<person>

<name>Nuno</name>

<address>Dublin</address>

</person>

RDF

How many pizzas were delivered toNuno’s home during his PhD?

2012

From 2008 to 2012

1 / 24

Page 8: Integrating Heterogeneous Data by Extending Semantic Web Standards

Data Integration: Pizza Delivery Company

RDB

Clients/ Ordersperson addressNuno Galway

Deliveries

XML

Clients/ Orders

XML

<person>

<name>Nuno</name>

<address>Dublin</address>

</person>

RDF

How many pizzas were delivered toNuno’s home during his PhD?

2012

From 2008 to 2012

1 / 24

Page 9: Integrating Heterogeneous Data by Extending Semantic Web Standards

Data Integration: Pizza Delivery Company

RDB

Clients/ Ordersperson addressNuno Galway

Deliveries

XML

Clients/ Orders

XML

<person>

<name>Nuno</name>

<address>Dublin</address>

</person>

RDF

How many pizzas were delivered toNuno’s home during his PhD?

2012

From 2008 to 2012

1 / 24

Page 10: Integrating Heterogeneous Data by Extending Semantic Web Standards

Data Integration: Pizza Delivery Company

RDB

Clients/ Ordersperson addressNuno Galway

Deliveries

XML

Clients/ Orders

XML

<person>

<name>Nuno</name>

<address>Dublin</address>

</person>

RDF

How many pizzas were delivered toNuno’s home during his PhD?

2012

From 2008 to 2012

1 / 24

Page 11: Integrating Heterogeneous Data by Extending Semantic Web Standards

Data Integration: Pizza Delivery Company

RDB

Clients/ Ordersperson addressNuno Galway

Deliveries

XML

Clients/ Orders

XML

<person>

<name>Nuno</name>

<address>Dublin</address>

</person>

RDF

How many pizzas were delivered toNuno’s home during his PhD?

2012

From 2008 to 2012

1 / 24

Page 12: Integrating Heterogeneous Data by Extending Semantic Web Standards

Data Integration: Pizza Delivery Company

RDB

Clients/ Ordersperson addressNuno Galway

Deliveries

XML

Clients/ Orders

XML

<person>

<name>Nuno</name>

<address>Dublin</address>

</person>

RDF

How many pizzas were delivered toNuno’s home during his PhD?

2012

From 2008 to 2012

1 / 24

Page 13: Integrating Heterogeneous Data by Extending Semantic Web Standards

Using Query Languages for Data Integration

SQLselect address from clients

where person = "Nuno"

SPARQLselect $lat $long

from <geonames.org/..>

where { $point geo:lat $lat;

geo:long $long }

XQueryfor $person in doc("eat.ie/..")

return $person//name

relation

solution sequence

sequence of items

Med

iato

r/

Dat

aW

areh

ouse

How

man

ypi

zzas

wer

ede

liver

edto

Nun

o’s

hom

edu

ring

his

PhD

?

2 / 24

Page 14: Integrating Heterogeneous Data by Extending Semantic Web Standards

Using Query Languages for Data Integration

SQLselect address from clients

where person = "Nuno"

SPARQLselect $lat $long

from <geonames.org/..>

where { $point geo:lat $lat;

geo:long $long }

XQueryfor $person in doc("eat.ie/..")

return $person//name

relation

solution sequence

sequence of items

Med

iato

r/

Dat

aW

areh

ouse

How

man

ypi

zzas

wer

ede

liver

edto

Nun

o’s

hom

edu

ring

his

PhD

?

2 / 24

Page 15: Integrating Heterogeneous Data by Extending Semantic Web Standards

Using Query Languages for Data Integration

SQLselect address from clients

where person = "Nuno"

SPARQLselect $lat $long

from <geonames.org/..>

where { $point geo:lat $lat;

geo:long $long }

XQueryfor $person in doc("eat.ie/..")

return $person//name

relation

solution sequence

sequence of items

Med

iato

r/

Dat

aW

areh

ouse

How

man

ypi

zzas

wer

ede

liver

edto

Nun

o’s

hom

edu

ring

his

PhD

?

2 / 24

Page 16: Integrating Heterogeneous Data by Extending Semantic Web Standards

Using Query Languages for Data Integration

SQLselect address from clients

where person = "Nuno"

SPARQLselect $lat $long

from <geonames.org/..>

where { $point geo:lat $lat;

geo:long $long }

XQueryfor $person in doc("eat.ie/..")

return $person//name

relation

solution sequence

sequence of items

Med

iato

r/

Dat

aW

areh

ouse

How

man

ypi

zzas

wer

ede

liver

edto

Nun

o’s

hom

edu

ring

his

PhD

?

2 / 24

Page 17: Integrating Heterogeneous Data by Extending Semantic Web Standards

Using Query Languages for Data Integration

SQLselect address from clients

where person = "Nuno"

SPARQLselect $lat $long

from <geonames.org/..>

where { $point geo:lat $lat;

geo:long $long }

XQueryfor $person in doc("eat.ie/..")

return $person//name

relation

solution sequence

sequence of items

Med

iato

r/

Dat

aW

areh

ouse

How

man

ypi

zzas

wer

ede

liver

edto

Nun

o’s

hom

edu

ring

his

PhD

?

2 / 24

Page 18: Integrating Heterogeneous Data by Extending Semantic Web Standards

Using Query Languages for Data Integration

SQLselect address from clients

where person = "Nuno"

SPARQLselect $lat $long

from <geonames.org/..>

where { $point geo:lat $lat;

geo:long $long }

XQueryfor $person in doc("eat.ie/..")

return $person//name

relation

solution sequence

sequence of items

Med

iato

r/

Dat

aW

areh

ouse

How

man

ypi

zzas

wer

ede

liver

edto

Nun

o’s

hom

edu

ring

his

PhD

?

2 / 24

Page 19: Integrating Heterogeneous Data by Extending Semantic Web Standards

How to represent context information in RDF?

RDF triples:nuno :address :Galway .

:nuno :address :Dublin .

Domain vocabulary/ontology:address1 a :AddressRecord;

:person :nuno;

:address :Galway;

:start "2008" ;

:end "2012" .

Reification:address1 rdf:type rdf:Statement

rdf:subject :nuno;

rdf:predicate :address ;

rdf:object :Dublin ;

:loc <http://eat.ie/> .

Named Graphs

3 / 24

Page 20: Integrating Heterogeneous Data by Extending Semantic Web Standards

How to represent context information in RDF?

RDF triples:nuno :address :Galway .

:nuno :address :Dublin .Not enough!

Domain vocabulary/ontology:address1 a :AddressRecord;

:person :nuno;

:address :Galway;

:start "2008" ;

:end "2012" .

Reification:address1 rdf:type rdf:Statement

rdf:subject :nuno;

rdf:predicate :address ;

rdf:object :Dublin ;

:loc <http://eat.ie/> .

Named Graphs

3 / 24

Page 21: Integrating Heterogeneous Data by Extending Semantic Web Standards

How to represent context information in RDF?

RDF triples:nuno :address :Galway .

:nuno :address :Dublin .Not enough!

Domain vocabulary/ontology:address1 a :AddressRecord;

:person :nuno;

:address :Galway;

:start "2008" ;

:end "2012" .

Reification:address1 rdf:type rdf:Statement

rdf:subject :nuno;

rdf:predicate :address ;

rdf:object :Dublin ;

:loc <http://eat.ie/> .

Named Graphs

3 / 24

Page 22: Integrating Heterogeneous Data by Extending Semantic Web Standards

How to represent context information in RDF?

RDF triples:nuno :address :Galway .

:nuno :address :Dublin .Not enough!

Domain vocabulary/ontology:address1 a :AddressRecord;

:person :nuno;

:address :Galway;

:start "2008" ;

:end "2012" .

Reification:address1 rdf:type rdf:Statement

rdf:subject :nuno;

rdf:predicate :address ;

rdf:object :Dublin ;

:loc <http://eat.ie/> .

Named Graphs

3 / 24

Page 23: Integrating Heterogeneous Data by Extending Semantic Web Standards

How to represent context information in RDF?

RDF triples:nuno :address :Galway .

:nuno :address :Dublin .Not enough!

Domain vocabulary/ontology:address1 a :AddressRecord;

:person :nuno;

:address :Galway;

:start "2008" ;

:end "2012" .

Reification:address1 rdf:type rdf:Statement

rdf:subject :nuno;

rdf:predicate :address ;

rdf:object :Dublin ;

:loc <http://eat.ie/> .

Named Graphs

3 / 24

Page 24: Integrating Heterogeneous Data by Extending Semantic Web Standards

How to represent context information in RDF?

RDF triples:nuno :address :Galway .

:nuno :address :Dublin .Not enough!

Domain vocabulary/ontology:address1 a :AddressRecord;

:person :nuno;

:address :Galway;

:start "2008" ;

:end "2012" .

No definedsemantics!

Reification:address1 rdf:type rdf:Statement

rdf:subject :nuno;

rdf:predicate :address ;

rdf:object :Dublin ;

:loc <http://eat.ie/> .

No definedsemantics!

Named Graphs

3 / 24

Page 25: Integrating Heterogeneous Data by Extending Semantic Web Standards

Hypothesis and Research Questions

Hypothesis

Efficient data integration over heterogenous data sources can beachieved by

a combined query language that accesses heterogenous data inits original sources

optimisations for efficient query evaluation for this language

an RDF-based format with support for context information

Research Questions

How to design a query language that bridges the differentformats?

Can we reuse existing optimisations from other query languages?

How to adapt RDF and SPARQL for context information?

4 / 24

Page 26: Integrating Heterogeneous Data by Extending Semantic Web Standards

Hypothesis and Research Questions

Hypothesis

Efficient data integration over heterogenous data sources can beachieved by

a combined query language that accesses heterogenous data inits original sources

optimisations for efficient query evaluation for this language

an RDF-based format with support for context information

Research Questions

How to design a query language that bridges the differentformats?

Can we reuse existing optimisations from other query languages?

How to adapt RDF and SPARQL for context information?

4 / 24

Page 27: Integrating Heterogeneous Data by Extending Semantic Web Standards

Hypothesis and Research Questions

Hypothesis

Efficient data integration over heterogenous data sources can beachieved by

a combined query language that accesses heterogenous data inits original sources

optimisations for efficient query evaluation for this language

an RDF-based format with support for context information

Research Questions

How to design a query language that bridges the differentformats?

Can we reuse existing optimisations from other query languages?

How to adapt RDF and SPARQL for context information?

4 / 24

Page 28: Integrating Heterogeneous Data by Extending Semantic Web Standards

Hypothesis and Research Questions

Hypothesis

Efficient data integration over heterogenous data sources can beachieved by

a combined query language that accesses heterogenous data inits original sources

optimisations for efficient query evaluation for this language

an RDF-based format with support for context information

Research Questions

How to design a query language that bridges the differentformats?

Can we reuse existing optimisations from other query languages?

How to adapt RDF and SPARQL for context information?

4 / 24

Page 29: Integrating Heterogeneous Data by Extending Semantic Web Standards

Hypothesis and Research Questions

Hypothesis

Efficient data integration over heterogenous data sources can beachieved by

a combined query language that accesses heterogenous data inits original sources

optimisations for efficient query evaluation for this language

an RDF-based format with support for context information

Research Questions

How to design a query language that bridges the differentformats?

Can we reuse existing optimisations from other query languages?

How to adapt RDF and SPARQL for context information?

4 / 24

Page 30: Integrating Heterogeneous Data by Extending Semantic Web Standards

Hypothesis and Research Questions

Hypothesis

Efficient data integration over heterogenous data sources can beachieved by

a combined query language that accesses heterogenous data inits original sources

optimisations for efficient query evaluation for this language

an RDF-based format with support for context information

Research Questions

How to design a query language that bridges the differentformats?

Can we reuse existing optimisations from other query languages?

How to adapt RDF and SPARQL for context information?

4 / 24

Page 31: Integrating Heterogeneous Data by Extending Semantic Web Standards

Hypothesis and Research Questions

Hypothesis

Efficient data integration over heterogenous data sources can beachieved by

a combined query language that accesses heterogenous data inits original sources

optimisations for efficient query evaluation for this language

an RDF-based format with support for context information

Research Questions

How to design a query language that bridges the differentformats?

Can we reuse existing optimisations from other query languages?

How to adapt RDF and SPARQL for context information?

4 / 24

Page 32: Integrating Heterogeneous Data by Extending Semantic Web Standards

Outline and Contributions

XSPARQLSyntax & SemanticsImplementationEvaluation

[JoDS2012],[EPIA2011]

Annotated RDF(S)Annotated RDF(S)AnQL: Annotated SPARQLArchitecture

[AAAI2010],[ISWC2010],[JWS2012]

Page 33: Integrating Heterogeneous Data by Extending Semantic Web Standards

Outline and Contributions

XSPARQLSyntax & SemanticsImplementationEvaluation

[JoDS2012],[EPIA2011]

Annotated RDF(S)Annotated RDF(S)AnQL: Annotated SPARQLArchitecture

[AAAI2010],[ISWC2010],[JWS2012]

Page 34: Integrating Heterogeneous Data by Extending Semantic Web Standards

Outline and Contributions

XSPARQLSyntax & SemanticsImplementationEvaluation

[JoDS2012],[EPIA2011]

Annotated RDF(S)Annotated RDF(S)AnQL: Annotated SPARQLArchitecture

[AAAI2010],[ISWC2010],[JWS2012]

Page 35: Integrating Heterogeneous Data by Extending Semantic Web Standards

XSPARQL

SPA QLML

XDF

RTransformation language between RDB,XML, and RDF

Syntactic extension of XQuery

Semantics based on XQuery’s semantics

Why based on XQuery?

Expressive language

Use as scripting language

Arbitrary Nesting of expressions

5 / 24

Page 36: Integrating Heterogeneous Data by Extending Semantic Web Standards

XSPARQL

SPA QLML

XDF

RTransformation language between RDB,XML, and RDF

Syntactic extension of XQuery

Semantics based on XQuery’s semantics

Why based on XQuery?

Expressive language

Use as scripting language

Arbitrary Nesting of expressions

5 / 24

Page 37: Integrating Heterogeneous Data by Extending Semantic Web Standards

XSPARQL

SPA QLML

XDF

RTransformation language between RDB,XML, and RDF

Syntactic extension of XQuery

Semantics based on XQuery’s semantics

Why based on XQuery?

Expressive language

Use as scripting language

Arbitrary Nesting of expressions

5 / 24

Page 38: Integrating Heterogeneous Data by Extending Semantic Web Standards

XSPARQL

SPA QLML

XDF

RTransformation language between RDB,XML, and RDF

Syntactic extension of XQuery

Semantics based on XQuery’s semantics

Why based on XQuery?

Expressive language

Use as scripting language

Arbitrary Nesting of expressions

5 / 24

Page 39: Integrating Heterogeneous Data by Extending Semantic Web Standards

XSPARQL

SPA QLML

XDF

RTransformation language between RDB,XML, and RDF

Syntactic extension of XQuery

Semantics based on XQuery’s semantics

Why based on XQuery?

Expressive language

Use as scripting language

Arbitrary Nesting of expressions

5 / 24

Page 40: Integrating Heterogeneous Data by Extending Semantic Web Standards

Same Language for each Format

XSPARQLfor address as $address from clients

where person = "Nuno"

return $address

XSPARQLfor $lat $long from <geonames.org/..>

where { $point geo:lat $lat;

geo:long $long }

return $lat

for $person in doc("eat.ie/..")

return $person//name

for var in Expr

let var := Expr

where Expr

order by Expr

return Expr

for SelectSpecfrom RelationListwhere WhereSpecListreturn Expr

for varlistfrom DatasetClausewhere { pattern }return Expr

6 / 24

Page 41: Integrating Heterogeneous Data by Extending Semantic Web Standards

Same Language for each Format

XSPARQLfor address as $address from clients

where person = "Nuno"

return $address

XSPARQLfor $lat $long from <geonames.org/..>

where { $point geo:lat $lat;

geo:long $long }

return $lat

XQueryfor $person in doc("eat.ie/..")

return $person//name

for var in Expr

let var := Expr

where Expr

order by Expr

return Expr

for SelectSpecfrom RelationListwhere WhereSpecListreturn Expr

for varlistfrom DatasetClausewhere { pattern }return Expr

6 / 24

Page 42: Integrating Heterogeneous Data by Extending Semantic Web Standards

Same Language for each Format

XSPARQLfor address as $address from clients

where person = "Nuno"

return $address

XSPARQLfor $lat $long from <geonames.org/..>

where { $point geo:lat $lat;

geo:long $long }

return $lat

XSPARQLfor $person in doc("eat.ie/..")

return $person//name

for var in Expr

let var := Expr

where Expr

order by Expr

return Expr

for SelectSpecfrom RelationListwhere WhereSpecListreturn Expr

for varlistfrom DatasetClausewhere { pattern }return Expr

6 / 24

Page 43: Integrating Heterogeneous Data by Extending Semantic Web Standards

Same Language for each Format

XSPARQLfor address as $address from clients

where person = "Nuno"

return $address

XSPARQLfor $lat $long from <geonames.org/..>

where { $point geo:lat $lat;

geo:long $long }

return $lat

for $person in doc("eat.ie/..")

return $person//name

for var in Expr

let var := Expr

where Expr

order by Expr

return Expr

for SelectSpecfrom RelationListwhere WhereSpecListreturn Expr

for varlistfrom DatasetClausewhere { pattern }return Expr

6 / 24

Page 44: Integrating Heterogeneous Data by Extending Semantic Web Standards

Same Language for each Format

XSPARQLfor address as $address from clients

where person = "Nuno"

return $address

XSPARQLfor $lat $long from <geonames.org/..>

where { $point geo:lat $lat;

geo:long $long }

return $lat

for $person in doc("eat.ie/..")

return $person//name

for var in Expr

let var := Expr

where Expr

order by Expr

return Expr

for SelectSpecfrom RelationListwhere WhereSpecListreturn Expr

for varlistfrom DatasetClausewhere { pattern }return Expr

6 / 24

Page 45: Integrating Heterogeneous Data by Extending Semantic Web Standards

Creating RDF with XSPARQL

Convert online orders into RDFprefix : <http://pizza-vocab.ie/>

for $person in doc("eat.ie/..")//name

construct { :meal a :FoodOrder; :author {$person} } construct

clause generatesRDF

Arbitrary XSPARQLexpressions in subject,predicate, and object

Query result@prefix : <http://pizza-vocab.ie/> .

:meal a :FoodOrder .

:meal :author "Nuno" .

7 / 24

Page 46: Integrating Heterogeneous Data by Extending Semantic Web Standards

Creating RDF with XSPARQL

Convert online orders into RDFprefix : <http://pizza-vocab.ie/>

for $person in doc("eat.ie/..")//name

construct { :meal a :FoodOrder; :author {$person} } construct

clause generatesRDF

Arbitrary XSPARQLexpressions in subject,predicate, and object

Query result@prefix : <http://pizza-vocab.ie/> .

:meal a :FoodOrder .

:meal :author "Nuno" .

7 / 24

Page 47: Integrating Heterogeneous Data by Extending Semantic Web Standards

Creating RDF with XSPARQL

Convert online orders into RDFprefix : <http://pizza-vocab.ie/>

for $person in doc("eat.ie/..")//name

construct { :meal a :FoodOrder; :author {$person} } construct

clause generatesRDF

Arbitrary XSPARQLexpressions in subject,predicate, and object

Query result@prefix : <http://pizza-vocab.ie/> .

:meal a :FoodOrder .

:meal :author "Nuno" .

7 / 24

Page 48: Integrating Heterogeneous Data by Extending Semantic Web Standards

Creating RDF with XSPARQL

Convert online orders into RDFprefix : <http://pizza-vocab.ie/>

for $person in doc("eat.ie/..")//name

construct { :meal a :FoodOrder; :author {$person} } construct

clause generatesRDF

Arbitrary XSPARQLexpressions in subject,predicate, and object

Query result@prefix : <http://pizza-vocab.ie/> .

:meal a :FoodOrder .

:meal :author "Nuno" .

7 / 24

Page 49: Integrating Heterogeneous Data by Extending Semantic Web Standards

Integration Query Example

“Display pizza deliveries in Google Maps using KML”

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $person

let $uri := fn:concat(

"api.geonames.org/search?q=", $address)

for $lat $long from $uri

where { $point geo:lat $lat; geo:long $long }

return <kml>

<lat>{$lat}<lat>

<long>{$long}</long>

</kml>

More involved XSPARQL queries: RDB2RDF

Direct Mapping: ∼130 LOC

R2RML: ∼290 LOC

8 / 24

Page 50: Integrating Heterogeneous Data by Extending Semantic Web Standards

Integration Query Example

“Display pizza deliveries in Google Maps using KML”

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $person

let $uri := fn:concat(

"api.geonames.org/search?q=", $address)

for $lat $long from $uri

where { $point geo:lat $lat; geo:long $long }

return <kml>

<lat>{$lat}<lat>

<long>{$long}</long>

</kml>

More involved XSPARQL queries: RDB2RDF

Direct Mapping: ∼130 LOC

R2RML: ∼290 LOC

8 / 24

Page 51: Integrating Heterogeneous Data by Extending Semantic Web Standards

Integration Query Example

“Display pizza deliveries in Google Maps using KML”

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $person

let $uri := fn:concat(

"api.geonames.org/search?q=", $address)

for $lat $long from $uri

where { $point geo:lat $lat; geo:long $long }

return <kml>

<lat>{$lat}<lat>

<long>{$long}</long>

</kml>

More involved XSPARQL queries: RDB2RDF

Direct Mapping: ∼130 LOC

R2RML: ∼290 LOC

8 / 24

Page 52: Integrating Heterogeneous Data by Extending Semantic Web Standards

Integration Query Example

“Display pizza deliveries in Google Maps using KML”

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $person

let $uri := fn:concat(

"api.geonames.org/search?q=", $address)

for $lat $long from $uri

where { $point geo:lat $lat; geo:long $long }

return <kml>

<lat>{$lat}<lat>

<long>{$long}</long>

</kml>

More involved XSPARQL queries: RDB2RDF

Direct Mapping: ∼130 LOC

R2RML: ∼290 LOC

8 / 24

Page 53: Integrating Heterogeneous Data by Extending Semantic Web Standards

Integration Query Example

“Display pizza deliveries in Google Maps using KML”

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $person

let $uri := fn:concat(

"api.geonames.org/search?q=", $address)

for $lat $long from $uri

where { $point geo:lat $lat; geo:long $long }

return <kml>

<lat>{$lat}<lat>

<long>{$long}</long>

</kml>

More involved XSPARQL queries: RDB2RDF

Direct Mapping: ∼130 LOC

R2RML: ∼290 LOC

8 / 24

Page 54: Integrating Heterogeneous Data by Extending Semantic Web Standards

Integration Query Example

“Display pizza deliveries in Google Maps using KML”

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $person

let $uri := fn:concat(

"api.geonames.org/search?q=", $address)

for $lat $long from $uri

where { $point geo:lat $lat; geo:long $long }

return <kml>

<lat>{$lat}<lat>

<long>{$long}</long>

</kml>

More involved XSPARQL queries: RDB2RDF

Direct Mapping: ∼130 LOC

R2RML: ∼290 LOC

8 / 24

Page 55: Integrating Heterogeneous Data by Extending Semantic Web Standards

Language Semantics

Extension of the XQuery Evaluation Semantics

for add variables and values to the dynamic environment

Reuse semantics of original languages for the new expressions

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $person

let $uri := fn:concat(

"api.geonames.org/search?q=", $address)

for $lat $long from $uri

where { $point geo:lat $lat; geo:long $long }

return <kml>

<lat>{$lat}<lat>

<long>{$long}</long>

</kml>

dynEnv.varValue ⇒relation

person”nuno”

eval(SQL SELECT)

on dynEnv.varValue

dynEnv.varValue ⇒SPARQL sol. seq.

{{ person ⇒ ”nuno” }}

eval(SPARQL SELECT)

solutions compatible

dynEnv.varValue

dynEnv.globalPosition =(

Pos1, · · · , Pos j)

dynEnv ` fs:dataset(DatasetClause)⇒ Dataset

dynEnv ` fs:sparql

(Dataset ,WhereClause,SolutionModifier

)⇒ µ1 , . . . , µm

dynEnv + globalPosition((

Pos1, · · · , Pos j , 1))

+ activeDataset(Dataset)

+ varValue

Var1 ⇒ fs:value(µ1 , Var1

);

. . . ;Varn ⇒ fs:value

(µ1 , Varn

) ` ExprSingle⇒ Value1

.

.

.

dynEnv + globalPosition((

Pos1, · · · , Pos j ,m))

+ activeDataset(Dataset)

+ varValue

Var1 ⇒ fs:value(µm, Var1

);

. . . ;Varn ⇒ fs:value

(µm, Varn

) ` ExprSingle⇒ Valuem

dynEnv `for $Var1 · · · $Varn DatasetClauseWhereClause SolutionModifierreturn ExprSingle

⇒ Value1, . . . , Valuem

dynEnv ` fs:sparql

(Dataset ,WhereClause,SolutionModifier

)⇒ µ1 , . . . , µm

9 / 24

Page 56: Integrating Heterogeneous Data by Extending Semantic Web Standards

Language Semantics

Extension of the XQuery Evaluation Semantics

for add variables and values to the dynamic environment

Reuse semantics of original languages for the new expressions

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $person

let $uri := fn:concat(

"api.geonames.org/search?q=", $address)

for $lat $long from $uri

where { $point geo:lat $lat; geo:long $long }

return <kml>

<lat>{$lat}<lat>

<long>{$long}</long>

</kml>

dynEnv.varValue ⇒relation

person”nuno”

eval(SQL SELECT)

on dynEnv.varValue

dynEnv.varValue ⇒SPARQL sol. seq.

{{ person ⇒ ”nuno” }}

eval(SPARQL SELECT)

solutions compatible

dynEnv.varValue

dynEnv.globalPosition =(

Pos1, · · · , Pos j)

dynEnv ` fs:dataset(DatasetClause)⇒ Dataset

dynEnv ` fs:sparql

(Dataset ,WhereClause,SolutionModifier

)⇒ µ1 , . . . , µm

dynEnv + globalPosition((

Pos1, · · · , Pos j , 1))

+ activeDataset(Dataset)

+ varValue

Var1 ⇒ fs:value(µ1 , Var1

);

. . . ;Varn ⇒ fs:value

(µ1 , Varn

) ` ExprSingle⇒ Value1

.

.

.

dynEnv + globalPosition((

Pos1, · · · , Pos j ,m))

+ activeDataset(Dataset)

+ varValue

Var1 ⇒ fs:value(µm, Var1

);

. . . ;Varn ⇒ fs:value

(µm, Varn

) ` ExprSingle⇒ Valuem

dynEnv `for $Var1 · · · $Varn DatasetClauseWhereClause SolutionModifierreturn ExprSingle

⇒ Value1, . . . , Valuem

dynEnv ` fs:sparql

(Dataset ,WhereClause,SolutionModifier

)⇒ µ1 , . . . , µm

9 / 24

Page 57: Integrating Heterogeneous Data by Extending Semantic Web Standards

Language Semantics

Extension of the XQuery Evaluation Semantics

for add variables and values to the dynamic environment

Reuse semantics of original languages for the new expressions

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $person

let $uri := fn:concat(

"api.geonames.org/search?q=", $address)

for $lat $long from $uri

where { $point geo:lat $lat; geo:long $long }

return <kml>

<lat>{$lat}<lat>

<long>{$long}</long>

</kml>

dynEnv.varValue ⇒relation

person”nuno”

eval(SQL SELECT)

on dynEnv.varValue

dynEnv.varValue ⇒SPARQL sol. seq.

{{ person ⇒ ”nuno” }}

eval(SPARQL SELECT)

solutions compatible

dynEnv.varValue

dynEnv.globalPosition =(

Pos1, · · · , Pos j)

dynEnv ` fs:dataset(DatasetClause)⇒ Dataset

dynEnv ` fs:sparql

(Dataset ,WhereClause,SolutionModifier

)⇒ µ1 , . . . , µm

dynEnv + globalPosition((

Pos1, · · · , Pos j , 1))

+ activeDataset(Dataset)

+ varValue

Var1 ⇒ fs:value(µ1 , Var1

);

. . . ;Varn ⇒ fs:value

(µ1 , Varn

) ` ExprSingle⇒ Value1

.

.

.

dynEnv + globalPosition((

Pos1, · · · , Pos j ,m))

+ activeDataset(Dataset)

+ varValue

Var1 ⇒ fs:value(µm, Var1

);

. . . ;Varn ⇒ fs:value

(µm, Varn

) ` ExprSingle⇒ Valuem

dynEnv `for $Var1 · · · $Varn DatasetClauseWhereClause SolutionModifierreturn ExprSingle

⇒ Value1, . . . , Valuem

dynEnv ` fs:sparql

(Dataset ,WhereClause,SolutionModifier

)⇒ µ1 , . . . , µm

9 / 24

Page 58: Integrating Heterogeneous Data by Extending Semantic Web Standards

Language Semantics

Extension of the XQuery Evaluation Semantics

for add variables and values to the dynamic environment

Reuse semantics of original languages for the new expressions

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $person

let $uri := fn:concat(

"api.geonames.org/search?q=", $address)

for $lat $long from $uri

where { $point geo:lat $lat; geo:long $long }

return <kml>

<lat>{$lat}<lat>

<long>{$long}</long>

</kml>

dynEnv.varValue ⇒relation

person”nuno”

eval(SQL SELECT)

on dynEnv.varValue

dynEnv.varValue ⇒SPARQL sol. seq.

{{ person ⇒ ”nuno” }}

eval(SPARQL SELECT)

solutions compatible

dynEnv.varValue

dynEnv.globalPosition =(

Pos1, · · · , Pos j)

dynEnv ` fs:dataset(DatasetClause)⇒ Dataset

dynEnv ` fs:sparql

(Dataset ,WhereClause,SolutionModifier

)⇒ µ1 , . . . , µm

dynEnv + globalPosition((

Pos1, · · · , Pos j , 1))

+ activeDataset(Dataset)

+ varValue

Var1 ⇒ fs:value(µ1 , Var1

);

. . . ;Varn ⇒ fs:value

(µ1 , Varn

) ` ExprSingle⇒ Value1

.

.

.

dynEnv + globalPosition((

Pos1, · · · , Pos j ,m))

+ activeDataset(Dataset)

+ varValue

Var1 ⇒ fs:value(µm, Var1

);

. . . ;Varn ⇒ fs:value

(µm, Varn

) ` ExprSingle⇒ Valuem

dynEnv `for $Var1 · · · $Varn DatasetClauseWhereClause SolutionModifierreturn ExprSingle

⇒ Value1, . . . , Valuem

dynEnv ` fs:sparql

(Dataset ,WhereClause,SolutionModifier

)⇒ µ1 , . . . , µm

9 / 24

Page 59: Integrating Heterogeneous Data by Extending Semantic Web Standards

Language Semantics

Extension of the XQuery Evaluation Semantics

for add variables and values to the dynamic environment

Reuse semantics of original languages for the new expressions

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $person

let $uri := fn:concat(

"api.geonames.org/search?q=", $address)

for $lat $long from $uri

where { $point geo:lat $lat; geo:long $long }

return <kml>

<lat>{$lat}<lat>

<long>{$long}</long>

</kml>

dynEnv.varValue ⇒relation

person”nuno”

eval(SQL SELECT)

on dynEnv.varValue

dynEnv.varValue ⇒SPARQL sol. seq.

{{ person ⇒ ”nuno” }}

eval(SPARQL SELECT)

solutions compatible

dynEnv.varValue

dynEnv.globalPosition =(

Pos1, · · · , Pos j)

dynEnv ` fs:dataset(DatasetClause)⇒ Dataset

dynEnv ` fs:sparql

(Dataset ,WhereClause,SolutionModifier

)⇒ µ1 , . . . , µm

dynEnv + globalPosition((

Pos1, · · · , Pos j , 1))

+ activeDataset(Dataset)

+ varValue

Var1 ⇒ fs:value(µ1 , Var1

);

. . . ;Varn ⇒ fs:value

(µ1 , Varn

) ` ExprSingle⇒ Value1

.

.

.

dynEnv + globalPosition((

Pos1, · · · , Pos j ,m))

+ activeDataset(Dataset)

+ varValue

Var1 ⇒ fs:value(µm, Var1

);

. . . ;Varn ⇒ fs:value

(µm, Varn

) ` ExprSingle⇒ Valuem

dynEnv `for $Var1 · · · $Varn DatasetClauseWhereClause SolutionModifierreturn ExprSingle

⇒ Value1, . . . , Valuem

dynEnv ` fs:sparql

(Dataset ,WhereClause,SolutionModifier

)⇒ µ1 , . . . , µm

9 / 24

Page 60: Integrating Heterogeneous Data by Extending Semantic Web Standards

Language Semantics

Extension of the XQuery Evaluation Semantics

for add variables and values to the dynamic environment

Reuse semantics of original languages for the new expressions

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $person

let $uri := fn:concat(

"api.geonames.org/search?q=", $address)

for $lat $long from $uri

where { $point geo:lat $lat; geo:long $long }

return <kml>

<lat>{$lat}<lat>

<long>{$long}</long>

</kml>

dynEnv.varValue ⇒relation

person”nuno”

eval(SQL SELECT)

on dynEnv.varValue

dynEnv.varValue ⇒SPARQL sol. seq.

{{ person ⇒ ”nuno” }}

eval(SPARQL SELECT)

solutions compatible

dynEnv.varValue

dynEnv.globalPosition =(

Pos1, · · · , Pos j)

dynEnv ` fs:dataset(DatasetClause)⇒ Dataset

dynEnv ` fs:sparql

(Dataset ,WhereClause,SolutionModifier

)⇒ µ1 , . . . , µm

dynEnv + globalPosition((

Pos1, · · · , Pos j , 1))

+ activeDataset(Dataset)

+ varValue

Var1 ⇒ fs:value(µ1 , Var1

);

. . . ;Varn ⇒ fs:value

(µ1 , Varn

) ` ExprSingle⇒ Value1

.

.

.

dynEnv + globalPosition((

Pos1, · · · , Pos j ,m))

+ activeDataset(Dataset)

+ varValue

Var1 ⇒ fs:value(µm, Var1

);

. . . ;Varn ⇒ fs:value

(µm, Varn

) ` ExprSingle⇒ Valuem

dynEnv `for $Var1 · · · $Varn DatasetClauseWhereClause SolutionModifierreturn ExprSingle

⇒ Value1, . . . , Valuem

dynEnv ` fs:sparql

(Dataset ,WhereClause,SolutionModifier

)⇒ µ1 , . . . , µm

9 / 24

Page 61: Integrating Heterogeneous Data by Extending Semantic Web Standards

Language Semantics

Extension of the XQuery Evaluation Semantics

for add variables and values to the dynamic environment

Reuse semantics of original languages for the new expressions

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $person

let $uri := fn:concat(

"api.geonames.org/search?q=", $address)

for $lat $long from $uri

where { $point geo:lat $lat; geo:long $long }

return <kml>

<lat>{$lat}<lat>

<long>{$long}</long>

</kml>

dynEnv.varValue ⇒relation

person”nuno”

eval(SQL SELECT)

on dynEnv.varValue

dynEnv.varValue ⇒SPARQL sol. seq.

{{ person ⇒ ”nuno” }}

eval(SPARQL SELECT)

solutions compatible

dynEnv.varValue

dynEnv.globalPosition =(

Pos1, · · · , Pos j)

dynEnv ` fs:dataset(DatasetClause)⇒ Dataset

dynEnv ` fs:sparql

(Dataset ,WhereClause,SolutionModifier

)⇒ µ1 , . . . , µm

dynEnv + globalPosition((

Pos1, · · · , Pos j , 1))

+ activeDataset(Dataset)

+ varValue

Var1 ⇒ fs:value(µ1 , Var1

);

. . . ;Varn ⇒ fs:value

(µ1 , Varn

) ` ExprSingle⇒ Value1

.

.

.

dynEnv + globalPosition((

Pos1, · · · , Pos j ,m))

+ activeDataset(Dataset)

+ varValue

Var1 ⇒ fs:value(µm, Var1

);

. . . ;Varn ⇒ fs:value

(µm, Varn

) ` ExprSingle⇒ Valuem

dynEnv `for $Var1 · · · $Varn DatasetClauseWhereClause SolutionModifierreturn ExprSingle

⇒ Value1, . . . , Valuem

dynEnv ` fs:sparql

(Dataset ,WhereClause,SolutionModifier

)⇒ µ1 , . . . , µm

9 / 24

Page 62: Integrating Heterogeneous Data by Extending Semantic Web Standards

Language Semantics

Extension of the XQuery Evaluation Semantics

for add variables and values to the dynamic environment

Reuse semantics of original languages for the new expressions

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $person

let $uri := fn:concat(

"api.geonames.org/search?q=", $address)

for $lat $long from $uri

where { $point geo:lat $lat; geo:long $long }

return <kml>

<lat>{$lat}<lat>

<long>{$long}</long>

</kml>

dynEnv.varValue ⇒relation

person”nuno”

eval(SQL SELECT)

on dynEnv.varValue

dynEnv.varValue ⇒SPARQL sol. seq.

{{ person ⇒ ”nuno” }}

eval(SPARQL SELECT)

solutions compatible

dynEnv.varValue

dynEnv.globalPosition =(

Pos1, · · · , Pos j)

dynEnv ` fs:dataset(DatasetClause)⇒ Dataset

dynEnv ` fs:sparql

(Dataset ,WhereClause,SolutionModifier

)⇒ µ1 , . . . , µm

dynEnv + globalPosition((

Pos1, · · · , Pos j , 1))

+ activeDataset(Dataset)

+ varValue

Var1 ⇒ fs:value(µ1 , Var1

);

. . . ;Varn ⇒ fs:value

(µ1 , Varn

) ` ExprSingle⇒ Value1

.

.

.

dynEnv + globalPosition((

Pos1, · · · , Pos j ,m))

+ activeDataset(Dataset)

+ varValue

Var1 ⇒ fs:value(µm, Var1

);

. . . ;Varn ⇒ fs:value

(µm, Varn

) ` ExprSingle⇒ Valuem

dynEnv `for $Var1 · · · $Varn DatasetClauseWhereClause SolutionModifierreturn ExprSingle

⇒ Value1, . . . , Valuem

dynEnv ` fs:sparql

(Dataset ,WhereClause,SolutionModifier

)⇒ µ1 , . . . , µm

9 / 24

Page 63: Integrating Heterogeneous Data by Extending Semantic Web Standards

Language Semantics

Extension of the XQuery Evaluation Semantics

for add variables and values to the dynamic environment

Reuse semantics of original languages for the new expressions

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $person

let $uri := fn:concat(

"api.geonames.org/search?q=", $address)

for $lat $long from $uri

where { $point geo:lat $lat; geo:long $long }

return <kml>

<lat>{$lat}<lat>

<long>{$long}</long>

</kml>

dynEnv.varValue ⇒relation

person”nuno”

eval(SQL SELECT)

on dynEnv.varValue

dynEnv.varValue ⇒SPARQL sol. seq.

{{ person ⇒ ”nuno” }}

eval(SPARQL SELECT)

solutions compatible

dynEnv.varValue

dynEnv.globalPosition =(

Pos1, · · · , Pos j)

dynEnv ` fs:dataset(DatasetClause)⇒ Dataset

dynEnv ` fs:sparql

(Dataset ,WhereClause,SolutionModifier

)⇒ µ1 , . . . , µm

dynEnv + globalPosition((

Pos1, · · · , Pos j , 1))

+ activeDataset(Dataset)

+ varValue

Var1 ⇒ fs:value(µ1 , Var1

);

. . . ;Varn ⇒ fs:value

(µ1 , Varn

) ` ExprSingle⇒ Value1

.

.

.

dynEnv + globalPosition((

Pos1, · · · , Pos j ,m))

+ activeDataset(Dataset)

+ varValue

Var1 ⇒ fs:value(µm, Var1

);

. . . ;Varn ⇒ fs:value

(µm, Varn

) ` ExprSingle⇒ Valuem

dynEnv `for $Var1 · · · $Varn DatasetClauseWhereClause SolutionModifierreturn ExprSingle

⇒ Value1, . . . , Valuem

dynEnv ` fs:sparql

(Dataset ,WhereClause,SolutionModifier

)⇒ µ1 , . . . , µm

9 / 24

Page 64: Integrating Heterogeneous Data by Extending Semantic Web Standards

Language Implementation

Reuse components (SPARQL engine, Relational Database)

Implemented XSPARQL by rewriting to XQuery

Semantics implemented by substitution of bound variables

Bound Variable Substitution

Bound variables are replaced by their value at runtime

Implemented in the generated XQuery

Pushing the variable bindings into the respective query engine

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $personfn:concat(

"SELECT address from clients

where person = ", $person)

10 / 24

Page 65: Integrating Heterogeneous Data by Extending Semantic Web Standards

Language Implementation

Reuse components (SPARQL engine, Relational Database)

Implemented XSPARQL by rewriting to XQuery

Semantics implemented by substitution of bound variables

Bound Variable Substitution

Bound variables are replaced by their value at runtime

Implemented in the generated XQuery

Pushing the variable bindings into the respective query engine

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $personfn:concat(

"SELECT address from clients

where person = ", $person)

10 / 24

Page 66: Integrating Heterogeneous Data by Extending Semantic Web Standards

Language Implementation

Reuse components (SPARQL engine, Relational Database)

Implemented XSPARQL by rewriting to XQuery

Semantics implemented by substitution of bound variables

Bound Variable Substitution

Bound variables are replaced by their value at runtime

Implemented in the generated XQuery

Pushing the variable bindings into the respective query engine

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $personfn:concat(

"SELECT address from clients

where person = ", $person)

10 / 24

Page 67: Integrating Heterogeneous Data by Extending Semantic Web Standards

Language Implementation

Reuse components (SPARQL engine, Relational Database)

Implemented XSPARQL by rewriting to XQuery

Semantics implemented by substitution of bound variables

Bound Variable Substitution

Bound variables are replaced by their value at runtime

Implemented in the generated XQuery

Pushing the variable bindings into the respective query engine

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $personfn:concat(

"SELECT address from clients

where person = ", $person)

10 / 24

Page 68: Integrating Heterogeneous Data by Extending Semantic Web Standards

Language Implementation

Reuse components (SPARQL engine, Relational Database)

Implemented XSPARQL by rewriting to XQuery

Semantics implemented by substitution of bound variables

Bound Variable Substitution

Bound variables are replaced by their value at runtime

Implemented in the generated XQuery

Pushing the variable bindings into the respective query engine

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $personfn:concat(

"SELECT address from clients

where person = ", $person)

10 / 24

Page 69: Integrating Heterogeneous Data by Extending Semantic Web Standards

Language Implementation

Reuse components (SPARQL engine, Relational Database)

Implemented XSPARQL by rewriting to XQuery

Semantics implemented by substitution of bound variables

Bound Variable Substitution

Bound variables are replaced by their value at runtime

Implemented in the generated XQuery

Pushing the variable bindings into the respective query engine

for $person in doc("eat.ie/...")//name

for address as $address from clients

where person = $personfn:concat(

"SELECT address from clients

where person = ", $person)

10 / 24

Page 70: Integrating Heterogeneous Data by Extending Semantic Web Standards

Implementation

XMLXML RDFRDF

QueryRewriter

XQueryquery

EnhancedXQueryengine

XSPARQLquery

XML RDFRDB

Custom XQuery func-tions implemented asJava methods

XQuerySQL SPARQL

XML /RDF

XSPARQL

11 / 24

Page 71: Integrating Heterogeneous Data by Extending Semantic Web Standards

Implementation

XMLXML RDFRDF

QueryRewriter

XQueryquery

EnhancedXQueryengine

XSPARQLquery

XML RDFRDB

Custom XQuery func-tions implemented asJava methods

XQuerySQL SPARQL

XML /RDF

XSPARQL

11 / 24

Page 72: Integrating Heterogeneous Data by Extending Semantic Web Standards

Implementation

XMLXML RDFRDF

QueryRewriter

XQueryquery

EnhancedXQueryengine

XSPARQLquery

XML RDFRDB

Custom XQuery func-tions implemented asJava methods

XQuerySQL SPARQL

XML /RDF

XSPARQL

11 / 24

Page 73: Integrating Heterogeneous Data by Extending Semantic Web Standards

Implementation

XMLXML RDFRDF

QueryRewriter

XQueryquery

EnhancedXQueryengine

XSPARQLquery

XML RDFRDB

Custom XQuery func-tions implemented asJava methods

XQuerySQL SPARQL

XML /RDF

XSPARQL

11 / 24

Page 74: Integrating Heterogeneous Data by Extending Semantic Web Standards

XSPARQL Evaluation

XMark XMarkRDF XMarkRDB

Experimental Results

Compared to native XQuery (XMark)

RDB and RDF: same order of magnitude for most queries

Except on RDF nested queries (self joining data)

several orders of magnitude slowerdue to the number of calls to the SPARQL engine

12 / 24

Page 75: Integrating Heterogeneous Data by Extending Semantic Web Standards

XSPARQL Evaluation

XMark XMarkRDF XMarkRDB

Experimental Results

Compared to native XQuery (XMark)

RDB and RDF: same order of magnitude for most queries

Except on RDF nested queries (self joining data)

several orders of magnitude slowerdue to the number of calls to the SPARQL engine

12 / 24

Page 76: Integrating Heterogeneous Data by Extending Semantic Web Standards

XSPARQL Evaluation

XMark XMarkRDF XMarkRDB

Experimental Results

Compared to native XQuery (XMark)

RDB and RDF: same order of magnitude for most queries

Except on RDF nested queries (self joining data)

several orders of magnitude slowerdue to the number of calls to the SPARQL engine

12 / 24

Page 77: Integrating Heterogeneous Data by Extending Semantic Web Standards

XSPARQL Evaluation

XMark XMarkRDF XMarkRDB

Experimental Results

Compared to native XQuery (XMark)

RDB and RDF: same order of magnitude for most queries

Except on RDF nested queries (self joining data)

several orders of magnitude slowerdue to the number of calls to the SPARQL engine

12 / 24

Page 78: Integrating Heterogeneous Data by Extending Semantic Web Standards

XSPARQL Evaluation

XMark XMarkRDF XMarkRDB

Experimental Results

Compared to native XQuery (XMark)

RDB and RDF: same order of magnitude for most queries

Except on RDF nested queries (self joining data)

several orders of magnitude slowerdue to the number of calls to the SPARQL engine

12 / 24

Page 79: Integrating Heterogeneous Data by Extending Semantic Web Standards

Rewriting techniques for Nested Queries

Q8: “List the names of persons and the number of items they bought.”

for $person $name from <input.rdf>

where { $person foaf:name $name }

return <item person="{$name}">

{count(

for * from <input.rdf>

where { $ca :buyer $person .}

return $ca

)}

</item>

Returns

nuno,axel,

...

sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer ", $person,

" .}")

)

nuno

nuno

axel

axel

let $aux := sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer $person .}" )

)

Join in XQuery

Nested Loop rewriting

let $aux := sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer $person .}" )

)

Applied to related language:SPARQL2XQuery [SAC2008]Other optimisations:Join in SPARQL

13 / 24

Page 80: Integrating Heterogeneous Data by Extending Semantic Web Standards

Rewriting techniques for Nested Queries

Q8: “List the names of persons and the number of items they bought.”

for $person $name from <input.rdf>

where { $person foaf:name $name }

return <item person="{$name}">

{count(

for * from <input.rdf>

where { $ca :buyer $person .}

return $ca

)}

</item>

Returns

nuno,axel,

...

sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer ", $person,

" .}")

)

nuno

nuno

axel

axel

let $aux := sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer $person .}" )

)

Join in XQuery

Nested Loop rewriting

let $aux := sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer $person .}" )

)

Applied to related language:SPARQL2XQuery [SAC2008]Other optimisations:Join in SPARQL

13 / 24

Page 81: Integrating Heterogeneous Data by Extending Semantic Web Standards

Rewriting techniques for Nested Queries

Q8: “List the names of persons and the number of items they bought.”

for $person $name from <input.rdf>

where { $person foaf:name $name }

return <item person="{$name}">

{count(

for * from <input.rdf>

where { $ca :buyer $person .}

return $ca

)}

</item>

Returns

nuno,axel,

...

sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer ", $person,

" .}")

)

nuno

nuno

axel

axel

let $aux := sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer $person .}" )

)

Join in XQuery

Nested Loop rewriting

let $aux := sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer $person .}" )

)

Applied to related language:SPARQL2XQuery [SAC2008]Other optimisations:Join in SPARQL

13 / 24

Page 82: Integrating Heterogeneous Data by Extending Semantic Web Standards

Rewriting techniques for Nested Queries

Q8: “List the names of persons and the number of items they bought.”

for $person $name from <input.rdf>

where { $person foaf:name $name }

return <item person="{$name}">

{count(

for * from <input.rdf>

where { $ca :buyer $person .}

return $ca

)}

</item>

Returns

nuno,axel,

...

sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer ", $person,

" .}")

)

nuno

nuno

axel

axel

let $aux := sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer $person .}" )

)

Join in XQuery

Nested Loop rewriting

let $aux := sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer $person .}" )

)

Applied to related language:SPARQL2XQuery [SAC2008]Other optimisations:Join in SPARQL

13 / 24

Page 83: Integrating Heterogeneous Data by Extending Semantic Web Standards

Rewriting techniques for Nested Queries

Q8: “List the names of persons and the number of items they bought.”

for $person $name from <input.rdf>

where { $person foaf:name $name }

return <item person="{$name}">

{count(

for * from <input.rdf>

where { $ca :buyer $person .}

return $ca

)}

</item>

Returns

nuno,axel,

...

sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer ", $person,

" .}")

)

nuno

nuno

axel

axel

let $aux := sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer $person .}" )

)

Join in XQuery

Nested Loop rewriting

let $aux := sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer $person .}" )

)

Applied to related language:SPARQL2XQuery [SAC2008]Other optimisations:Join in SPARQL

13 / 24

Page 84: Integrating Heterogeneous Data by Extending Semantic Web Standards

Rewriting techniques for Nested Queries

Q8: “List the names of persons and the number of items they bought.”

for $person $name from <input.rdf>

where { $person foaf:name $name }

return <item person="{$name}">

{count(

for * from <input.rdf>

where { $ca :buyer $person .}

return $ca

)}

</item>

Returns

nuno,axel,

...

sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer ", $person,

" .}")

)

nuno

nuno

axel

axel

let $aux := sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer $person .}" )

)

Join in XQuery

Nested Loop rewriting

let $aux := sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer $person .}" )

)

Applied to related language:SPARQL2XQuery [SAC2008]Other optimisations:Join in SPARQL

13 / 24

Page 85: Integrating Heterogeneous Data by Extending Semantic Web Standards

Rewriting techniques for Nested Queries

Q8: “List the names of persons and the number of items they bought.”

for $person $name from <input.rdf>

where { $person foaf:name $name }

return <item person="{$name}">

{count(

for * from <input.rdf>

where { $ca :buyer $person .}

return $ca

)}

</item>

Returns

nuno,axel,

...

sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer ", $person,

" .}")

)

nuno

nuno

axel

axel

let $aux := sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer $person .}" )

)

Join in XQuery

Nested Loop rewriting

let $aux := sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer $person .}" )

)

Applied to related language:SPARQL2XQuery [SAC2008]Other optimisations:Join in SPARQL

13 / 24

Page 86: Integrating Heterogeneous Data by Extending Semantic Web Standards

Rewriting techniques for Nested Queries

Q8: “List the names of persons and the number of items they bought.”

for $person $name from <input.rdf>

where { $person foaf:name $name }

return <item person="{$name}">

{count(

for * from <input.rdf>

where { $ca :buyer $person .}

return $ca

)}

</item>

Returns

nuno,axel,

...

sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer ", $person,

" .}")

)

nuno

nuno

axel

axel

let $aux := sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer $person .}" )

)

Join in XQuery

Nested Loop rewriting

let $aux := sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer $person .}" )

)

Applied to related language:SPARQL2XQuery [SAC2008]Other optimisations:Join in SPARQL

13 / 24

Page 87: Integrating Heterogeneous Data by Extending Semantic Web Standards

Rewriting techniques for Nested Queries

Q8: “List the names of persons and the number of items they bought.”

for $person $name from <input.rdf>

where { $person foaf:name $name }

return <item person="{$name}">

{count(

for * from <input.rdf>

where { $ca :buyer $person .}

return $ca

)}

</item>

Returns

nuno,axel,

...

sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer ", $person,

" .}")

)

nuno

nuno

axel

axel

let $aux := sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer $person .}" )

)

Join in XQuery

Nested Loop rewriting

let $aux := sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer $person .}" )

)

Applied to related language:SPARQL2XQuery [SAC2008]Other optimisations:Join in SPARQL

13 / 24

Page 88: Integrating Heterogeneous Data by Extending Semantic Web Standards

Rewriting techniques for Nested Queries

Q8: “List the names of persons and the number of items they bought.”

for $person $name from <input.rdf>

where { $person foaf:name $name }

return <item person="{$name}">

{count(

for * from <input.rdf>

where { $ca :buyer $person .}

return $ca

)}

</item>

Returns

nuno,axel,

...

sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer ", $person,

" .}")

)

nuno

nuno

axel

axel

let $aux := sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer $person .}" )

)

Join in XQuery

Nested Loop rewriting

let $aux := sparqlQuery(

fn:concat(

"SELECT * from <input.rdf>

where { $ca :buyer $person .}" )

)

Applied to related language:SPARQL2XQuery [SAC2008]Other optimisations:Join in SPARQL

13 / 24

Page 89: Integrating Heterogeneous Data by Extending Semantic Web Standards

Evaluation of different rewritings - XMarkRDFQ8

1 2 5 10 20 50 100

101

102XSPARQLRDF

Nested Loop

SPARQL rewrite

Dataset size in MB (log scale)

Tim

ein

seco

nd

s(l

ogsc

ale)

Optimised rewritings show promising results

Best Results: SPARQL-based

Results included in [JoDS2012]

14 / 24

Page 90: Integrating Heterogeneous Data by Extending Semantic Web Standards

Evaluation of different rewritings - XMarkRDBQ8

1 2 5 10 20 50 100

100

101

102

XSPARQLRDB

Nested Loop

Dataset size in MB (log scale)

Tim

ein

seco

nd

s(l

ogsc

ale)

Not so effective for RDB, requires different optimisations

Due to schema representation?

Additional Results for this thesis

15 / 24

Page 91: Integrating Heterogeneous Data by Extending Semantic Web Standards

Data Integration: Pizza Delivery Company

RDB

Clients/ Orders

Deliveries

XML

Clients/ Orders

XML

SPA QLML

XDF

R

RDF

person addressNuno Galway

<person>

<name>Nuno</name>

<address>Dublin</address>

</person>

2012

From 2008 to 2012

16 / 24

Page 92: Integrating Heterogeneous Data by Extending Semantic Web Standards

Data Integration: Pizza Delivery Company

RDB

Clients/ Orders

Deliveries

XML

Clients/ Orders

XML

SPA QLML

XDF

R

RDF

person addressNuno Galway

<person>

<name>Nuno</name>

<address>Dublin</address>

</person>

2012

From 2008 to 2012

16 / 24

Page 93: Integrating Heterogeneous Data by Extending Semantic Web Standards

Use Annotated RDF(S)!

Annotations refer to a specific domain

Temporal:

:nuno :address :Galway . [2008,2012]

Fuzzy:

:nuno :address :Dublin . 0.9

Provenance:

:nuno :address :Dublin . <http://eat.ie>

Representation for the values of each annotation domain

17 / 24

Page 94: Integrating Heterogeneous Data by Extending Semantic Web Standards

Use Annotated RDF(S)!

Annotations refer to a specific domain

Temporal:

:nuno :address :Galway . [2008,2012]

Fuzzy:

:nuno :address :Dublin . 0.9

Provenance:

:nuno :address :Dublin . <http://eat.ie>

Representation for the values of each annotation domain

17 / 24

Page 95: Integrating Heterogeneous Data by Extending Semantic Web Standards

Use Annotated RDF(S)!

Annotations refer to a specific domain

Temporal:

:nuno :address :Galway . [2008,2012]

Fuzzy:

:nuno :address :Dublin . 0.9

Provenance:

:nuno :address :Dublin . <http://eat.ie>

Representation for the values of each annotation domain

17 / 24

Page 96: Integrating Heterogeneous Data by Extending Semantic Web Standards

Use Annotated RDF(S)!

Annotations refer to a specific domain

Temporal:

:nuno :address :Galway . [2008,2012]

Fuzzy:

:nuno :address :Dublin . 0.9

Provenance:

:nuno :address :Dublin . <http://eat.ie>

Representation for the values of each annotation domain

17 / 24

Page 97: Integrating Heterogeneous Data by Extending Semantic Web Standards

Use Annotated RDF(S)!

Annotations refer to a specific domain

Temporal:

:nuno :address :Galway . [2008,2012]

Fuzzy:

:nuno :address :Dublin . 0.9

Provenance:

:nuno :address :Dublin . <http://eat.ie>

Representation for the values of each annotation domain

17 / 24

Page 98: Integrating Heterogeneous Data by Extending Semantic Web Standards

Annotated RDF(S) Inference example

Inference rules are independent of the annotation domain

RDFS subPropertyOf (“sp”) rule:

?Prop1 sp ?Prop2 .

?x ?Prop1 ?y .

⇒ ?x ?Prop2 ?y .

:address sp foaf:based near .

:nuno :address :Galway .

⇒ :nuno foaf:based near :Galway .

Extra rule to group annotations triples (⊕):

:nuno :address :Galway . [2009,+∞]

:nuno :address :Galway . [2008,2012]

18 / 24

Page 99: Integrating Heterogeneous Data by Extending Semantic Web Standards

Annotated RDF(S) Inference example

Inference rules are independent of the annotation domain

RDFS subPropertyOf (“sp”) rule:

?Prop1 sp ?Prop2 .

?x ?Prop1 ?y .

⇒ ?x ?Prop2 ?y .

:address sp foaf:based near .

:nuno :address :Galway .

⇒ :nuno foaf:based near :Galway .

Extra rule to group annotations triples (⊕):

:nuno :address :Galway . [2009,+∞]

:nuno :address :Galway . [2008,2012]

18 / 24

Page 100: Integrating Heterogeneous Data by Extending Semantic Web Standards

Annotated RDF(S) Inference example

Inference rules are independent of the annotation domain

Annotated RDFS subPropertyOf (“sp”) rule:

?Prop1 sp ?Prop2 . ?v1?x ?Prop1 ?y . ?v2

⇒ ?x ?Prop2 ?y .

:address sp foaf:based near . [2009,+∞]

:nuno :address :Galway . [2008,2012]

⇒ :nuno foaf:based near :Galway .

Extra rule to group annotations triples (⊕):

:nuno :address :Galway . [2009,+∞]

:nuno :address :Galway . [2008,2012]

18 / 24

Page 101: Integrating Heterogeneous Data by Extending Semantic Web Standards

Annotated RDF(S) Inference example

Inference rules are independent of the annotation domain

Annotated RDFS subPropertyOf (“sp”) rule:

?Prop1 sp ?Prop2 . ?v1?x ?Prop1 ?y . ?v2

⇒ ?x ?Prop2 ?y . ?v1 ⊗ ?v2

:address sp foaf:based near . [2009,+∞]

:nuno :address :Galway . [2008,2012]

⇒ :nuno foaf:based near :Galway . [2009,+∞]⊗[2008,2012]

Extra rule to group annotations triples (⊕):

:nuno :address :Galway . [2009,+∞]

:nuno :address :Galway . [2008,2012]

18 / 24

Page 102: Integrating Heterogeneous Data by Extending Semantic Web Standards

Annotated RDF(S) Inference example

Inference rules are independent of the annotation domain

Annotated RDFS subPropertyOf (“sp”) rule:

?Prop1 sp ?Prop2 . ?v1?x ?Prop1 ?y . ?v2

⇒ ?x ?Prop2 ?y . ?v1 ⊗ ?v2

:address sp foaf:based near . [2009,+∞]

:nuno :address :Galway . [2008,2012]

⇒ :nuno foaf:based near :Galway . [2009,+∞]⊗[2008,2012]

Extra rule to group annotations triples (⊕):

:nuno :address :Galway . [2009,+∞]

:nuno :address :Galway . [2008,2012]

18 / 24

Page 103: Integrating Heterogeneous Data by Extending Semantic Web Standards

Annotated RDF(S) Inference example

Inference rules are independent of the annotation domain

Annotated RDFS subPropertyOf (“sp”) rule:

?Prop1 sp ?Prop2 . ?v1?x ?Prop1 ?y . ?v2

⇒ ?x ?Prop2 ?y . ?v1 ⊗ ?v2

:address sp foaf:based near . [2009,+∞]

:nuno :address :Galway . [2008,2012]

⇒ :nuno foaf:based near :Galway . [2009,+∞]⊗[2008,2012]

Extra rule to group annotations triples (⊕):

:nuno :address :Galway . [2009,+∞]

:nuno :address :Galway . [2008,2012]

⇒ :nuno :address :Galway . [2009,+∞]⊕[2008,2012]

18 / 24

Page 104: Integrating Heterogeneous Data by Extending Semantic Web Standards

Annotated RDF(S) Inference example

Inference rules are independent of the annotation domain

Annotated RDFS subPropertyOf (“sp”) rule:

?Prop1 sp ?Prop2 . ?v1?x ?Prop1 ?y . ?v2

⇒ ?x ?Prop2 ?y . ?v1 ⊗ ?v2

:address sp foaf:based near . [2009,+∞]

:nuno :address :Galway . [2008,2012]

⇒ :nuno foaf:based near :Galway . [2009,+∞]⊗[2008,2012]

Extra rule to group annotations triples (⊕):

:nuno :address :Galway . [2009,+∞]

:nuno :address :Galway . [2008,2012]

⇒ :nuno :address :Galway . [2009,+∞]⊕[2008,2012]

18 / 24

Page 105: Integrating Heterogeneous Data by Extending Semantic Web Standards

Operations on Annotations Elements

[−∞,+∞]

[2008,+∞]

{

[2009,+∞]

} {

[2008, 2012]

}

{

[2009, 2012]

}

{

[]

}

⊕⊕

19 / 24

Page 106: Integrating Heterogeneous Data by Extending Semantic Web Standards

Operations on Annotations Elements

[−∞,+∞]

[2008,+∞]

{

[2009,+∞]

} {

[2008, 2012]

}

{

[2009, 2012]

}

{

[]

}

⊕⊕

19 / 24

Page 107: Integrating Heterogeneous Data by Extending Semantic Web Standards

Operations on Annotations Elements

[−∞,+∞]

[2008,+∞]

{

[2009,+∞]

} {

[2008, 2012]

}

{

[2009, 2012]

}

{

[]

}

⊕⊕

19 / 24

Page 108: Integrating Heterogeneous Data by Extending Semantic Web Standards

Operations on Annotations Elements

[−∞,+∞]

[2008,+∞]

{

[2009,+∞]

} {

[2008, 2012]

}

{

[2009, 2012]

}

{

[]

}

⊕⊕

19 / 24

Page 109: Integrating Heterogeneous Data by Extending Semantic Web Standards

Operations on Annotations Elements

[−∞,+∞]

[2008,+∞]

{

[2009,+∞]

} {

[2008, 2012]

}

{

[2009, 2012]

}

{

[]

}

⊕⊕

19 / 24

Page 110: Integrating Heterogeneous Data by Extending Semantic Web Standards

Operations on Annotations Elements

[−∞,+∞]

[2008,+∞]

{

[2000, 2005]

} {

[2008, 2012]

}

{

[2009, 2012]

}

{

[]

}

⊕⊕

19 / 24

Page 111: Integrating Heterogeneous Data by Extending Semantic Web Standards

Operations on Annotations Elements

[−∞,+∞]

[2008,+∞]

{

[2000, 2005]

} {

[2008, 2012]

}

{

[2009, 2012]

}

{

[]

}

⊕⊕

19 / 24

Page 112: Integrating Heterogeneous Data by Extending Semantic Web Standards

Operations on Annotations Elements

[−∞,+∞]

{

[2000, 2005], [2008, 2012]

}

{

[2000, 2005]

} {

[2008, 2012]

}

{

[2009, 2012]

}

{

[]

}

⊕⊕

19 / 24

Page 113: Integrating Heterogeneous Data by Extending Semantic Web Standards

Operations on Annotations Elements

[−∞,+∞]

{[2000, 2005], [2008, 2012]}

{[2000, 2005]} {[2008, 2012]}

{[2009, 2012]}

{[]}

⊕⊕

19 / 24

Page 114: Integrating Heterogeneous Data by Extending Semantic Web Standards

AnQL: Annotated SPARQL

Extension of SPARQL Syntax

triple pattern

annotated triple pattern is a triple pattern plus

annotation termannotation variable

Basic Annotated Patterns (BAP) are sets of annotated triplepatterns

Example?person a foaf:Person .

Combine BAPs using AND(.), OPTIONAL, UNION, FILTER

20 / 24

Page 115: Integrating Heterogeneous Data by Extending Semantic Web Standards

AnQL: Annotated SPARQL

Extension of SPARQL Syntax

triple pattern

annotated triple pattern is a triple pattern plus

annotation term

annotation variable

Basic Annotated Patterns (BAP) are sets of annotated triplepatterns

Example

?person a foaf:Person . [−∞, +∞]

Combine BAPs using AND(.), OPTIONAL, UNION, FILTER

20 / 24

Page 116: Integrating Heterogeneous Data by Extending Semantic Web Standards

AnQL: Annotated SPARQL

Extension of SPARQL Syntax

triple pattern

annotated triple pattern is a triple pattern plus

annotation term; orannotation variable

Basic Annotated Patterns (BAP) are sets of annotated triplepatterns

Example

?person a foaf:Person .

?person :address ?address . ?l

}

Combine BAPs using AND(.), OPTIONAL, UNION, FILTER

20 / 24

Page 117: Integrating Heterogeneous Data by Extending Semantic Web Standards

AnQL: Annotated SPARQL

Extension of SPARQL Syntax

triple pattern

annotated triple pattern is a triple pattern plus

annotation term; orannotation variable

Basic Annotated Patterns (BAP) are sets of annotated triplepatterns

Example

{ ?person a foaf:Person . [−∞, +∞]

?person :address ?address . ?l

}

Combine BAPs using AND(.), OPTIONAL, UNION, FILTER

20 / 24

Page 118: Integrating Heterogeneous Data by Extending Semantic Web Standards

AnQL: Annotated SPARQL

Extension of SPARQL Syntax

triple pattern

annotated triple pattern is a triple pattern plus

annotation term; orannotation variable

Basic Annotated Patterns (BAP) are sets of annotated triplepatterns

Example

{ ?person a foaf:Person . [−∞, +∞]

?person :address ?address . ?l

}

Combine BAPs using AND(.), OPTIONAL, UNION, FILTER

20 / 24

Page 119: Integrating Heterogeneous Data by Extending Semantic Web Standards

Evaluation of SPARQL OPTIONALs

“List my address, time interval and optionally people living in the samecity at the same time.”

SELECT ?city ?t ?person

WHERE { :nuno :address ?city . ?t

OPTIONAL { ?person :address ?city . ?t } }

Sample input:

:nuno :address :Galway . [2008, 2012]:axel :address :Galway . [2005, 2010]

Answers:

S1 = {?city → :Galway, ?t → [2008, 2012]}S2 = {?city → :Galway, ?t → [2008, 2010], ?person→ :axel}

OPTIONAL provide more information maybe restricting annotation values

21 / 24

Page 120: Integrating Heterogeneous Data by Extending Semantic Web Standards

Evaluation of SPARQL OPTIONALs

“List my address, time interval and optionally people living in the samecity at the same time.”

SELECT ?city ?t ?person

WHERE { :nuno :address ?city . ?t

OPTIONAL { ?person :address ?city . ?t } }

Sample input:

:nuno :address :Galway . [2008, 2012]:axel :address :Galway . [2005, 2010]

Answers:

S1 = {?city → :Galway, ?t → [2008, 2012]}

S2 = {?city → :Galway, ?t → [2008, 2010], ?person→ :axel}

OPTIONAL provide more information maybe restricting annotation values

21 / 24

Page 121: Integrating Heterogeneous Data by Extending Semantic Web Standards

Evaluation of SPARQL OPTIONALs

“List my address, time interval and optionally people living in the samecity at the same time.”

SELECT ?city ?t ?person

WHERE { :nuno :address ?city . ?t

OPTIONAL { ?person :address ?city . ?t } }

Sample input:

:nuno :address :Galway . [2008, 2012]:axel :address :Galway . [2005, 2010]

Answers:

S1 = {?city → :Galway, ?t → [2008, 2012]}S2 = {?city → :Galway, ?t → [2008, 2010], ?person→ :axel}

OPTIONAL provide more information maybe restricting annotation values

21 / 24

Page 122: Integrating Heterogeneous Data by Extending Semantic Web Standards

Evaluation of SPARQL OPTIONALs

“List my address, time interval and optionally people living in the samecity at the same time.”

SELECT ?city ?t ?person

WHERE { :nuno :address ?city . ?t

OPTIONAL { ?person :address ?city . ?t } }

Sample input:

:nuno :address :Galway . [2008, 2012]:axel :address :Galway . [2005, 2010]

Answers:

S1 = {?city → :Galway, ?t → [2008, 2012]}S2 = {?city → :Galway, ?t → [2008, 2010], ?person→ :axel}

OPTIONAL provide more information maybe restricting annotation values

21 / 24

Page 123: Integrating Heterogeneous Data by Extending Semantic Web Standards

Annotated RDF(S) Domains

Temporal:

:nuno :address :Galway . [2008,2012]

Fuzzy:

:nuno :address :Galway . 0.9

Provenance:

:nuno :address :Dublin . http://eat.ie

Combining domains: Included in [JWS2012]

:nuno :address :Dublin . (http://eat.ie, [2012,2012])

Access Control: Presented at [ICLP2012]

:nuno :address :Galway . [nl]

22 / 24

Page 124: Integrating Heterogeneous Data by Extending Semantic Web Standards

Annotated RDF(S) Domains

Temporal:

:nuno :address :Galway . [2008,2012]

Fuzzy:

:nuno :address :Galway . 0.9

Provenance:

:nuno :address :Dublin . http://eat.ie

Combining domains: Included in [JWS2012]

:nuno :address :Dublin . (http://eat.ie, [2012,2012])

Access Control: Presented at [ICLP2012]

:nuno :address :Galway . [nl]

22 / 24

Page 125: Integrating Heterogeneous Data by Extending Semantic Web Standards

Annotated RDF(S) Domains

Temporal:

:nuno :address :Galway . [2008,2012]

Fuzzy:

:nuno :address :Galway . 0.9

Provenance:

:nuno :address :Dublin . http://eat.ie

Combining domains: Included in [JWS2012]

:nuno :address :Dublin . (http://eat.ie, [2012,2012])

Access Control: Presented at [ICLP2012]

:nuno :address :Galway . [nl]

22 / 24

Page 126: Integrating Heterogeneous Data by Extending Semantic Web Standards

Architecture combining XSPARQL and AnQL

AnnotatedRDF

AnnotatedRDF

ReasonerAccessControl

FuzzyTemporal

Prove-nance

Domains

CustomRules

RDFS(ρdf)

Rules

AnQL

Annotated RDFS

AnQLQuery

AnnotatedRDF

XSPARQL

Data convertedto RDF usingXSPARQL

Implementation inSWI Prolog

Each domain is adifferent Prologmodule

Rules specified asProlog predicates

23 / 24

Page 127: Integrating Heterogeneous Data by Extending Semantic Web Standards

Architecture combining XSPARQL and AnQL

AnnotatedRDF

AnnotatedRDF

ReasonerAccessControl

FuzzyTemporal

Prove-nance

Domains

CustomRules

RDFS(ρdf)

Rules

AnQL

Annotated RDFS

AnQLQuery

AnnotatedRDF

XSPARQL

Data convertedto RDF usingXSPARQL

Implementation inSWI Prolog

Each domain is adifferent Prologmodule

Rules specified asProlog predicates

23 / 24

Page 128: Integrating Heterogeneous Data by Extending Semantic Web Standards

Architecture combining XSPARQL and AnQL

AnnotatedRDF

AnnotatedRDF

ReasonerAccessControl

FuzzyTemporal

Prove-nance

Domains

CustomRules

RDFS(ρdf)

Rules

AnQL

Annotated RDFS

AnQLQuery

AnnotatedRDF

XSPARQL

Data convertedto RDF usingXSPARQL

Implementation inSWI Prolog

Each domain is adifferent Prologmodule

Rules specified asProlog predicates

23 / 24

Page 129: Integrating Heterogeneous Data by Extending Semantic Web Standards

Architecture combining XSPARQL and AnQL

AnnotatedRDF

AnnotatedRDF

ReasonerAccessControl

FuzzyTemporal

Prove-nance

Domains

CustomRules

RDFS(ρdf)

Rules

AnQL

Annotated RDFS

AnQLQuery

AnnotatedRDF

XSPARQL

Data convertedto RDF usingXSPARQL

Implementation inSWI Prolog

Each domain is adifferent Prologmodule

Rules specified asProlog predicates

23 / 24

Page 130: Integrating Heterogeneous Data by Extending Semantic Web Standards

Architecture combining XSPARQL and AnQL

AnnotatedRDF

AnnotatedRDF

ReasonerAccessControl

FuzzyTemporal

Prove-nance

Domains

CustomRules

RDFS(ρdf)

Rules

AnQL

Annotated RDFS

AnQLQuery

AnnotatedRDF

XSPARQL

Data convertedto RDF usingXSPARQL

Implementation inSWI Prolog

Each domain is adifferent Prologmodule

Rules specified asProlog predicates

23 / 24

Page 131: Integrating Heterogeneous Data by Extending Semantic Web Standards

Conclusions

Efficient data integration over heterogenous data sources can beachieved by

1 a combined query language that accesses heterogenous data inits original sources

XSPARQL can integrate heterogeneous sources

2 optimisations for efficient query evaluation for this language

rewriting techniques for nested queries for our implementation ofXSPARQL

3 an RDF-based format with support for context information

Annotated RDFS: inferences and query over context informationUse XSPARQL to create Annotated RDF representing theintegrated data

Thank you! Questions?

24 / 24

Page 132: Integrating Heterogeneous Data by Extending Semantic Web Standards

Conclusions

Efficient data integration over heterogenous data sources can beachieved by1 a combined query language that accesses heterogenous data in

its original sources

XSPARQL can integrate heterogeneous sources

2 optimisations for efficient query evaluation for this language

rewriting techniques for nested queries for our implementation ofXSPARQL

3 an RDF-based format with support for context information

Annotated RDFS: inferences and query over context informationUse XSPARQL to create Annotated RDF representing theintegrated data

Thank you! Questions?

24 / 24

Page 133: Integrating Heterogeneous Data by Extending Semantic Web Standards

Conclusions

Efficient data integration over heterogenous data sources can beachieved by1 a combined query language that accesses heterogenous data in

its original sources

XSPARQL can integrate heterogeneous sources

2 optimisations for efficient query evaluation for this language

rewriting techniques for nested queries for our implementation ofXSPARQL

3 an RDF-based format with support for context information

Annotated RDFS: inferences and query over context informationUse XSPARQL to create Annotated RDF representing theintegrated data

Thank you! Questions?

24 / 24

Page 134: Integrating Heterogeneous Data by Extending Semantic Web Standards

Conclusions

Efficient data integration over heterogenous data sources can beachieved by1 a combined query language that accesses heterogenous data in

its original sources

XSPARQL can integrate heterogeneous sources

2 optimisations for efficient query evaluation for this language

rewriting techniques for nested queries for our implementation ofXSPARQL

3 an RDF-based format with support for context information

Annotated RDFS: inferences and query over context informationUse XSPARQL to create Annotated RDF representing theintegrated data

Thank you! Questions?

24 / 24

Page 135: Integrating Heterogeneous Data by Extending Semantic Web Standards

Conclusions

Efficient data integration over heterogenous data sources can beachieved by1 a combined query language that accesses heterogenous data in

its original sources

XSPARQL can integrate heterogeneous sources

2 optimisations for efficient query evaluation for this language

rewriting techniques for nested queries for our implementation ofXSPARQL

3 an RDF-based format with support for context information

Annotated RDFS: inferences and query over context informationUse XSPARQL to create Annotated RDF representing theintegrated data

Thank you! Questions?

24 / 24

Page 136: Integrating Heterogeneous Data by Extending Semantic Web Standards

Conclusions

Efficient data integration over heterogenous data sources can beachieved by1 a combined query language that accesses heterogenous data in

its original sources

XSPARQL can integrate heterogeneous sources

2 optimisations for efficient query evaluation for this language

rewriting techniques for nested queries for our implementation ofXSPARQL

3 an RDF-based format with support for context information

Annotated RDFS: inferences and query over context informationUse XSPARQL to create Annotated RDF representing theintegrated data

Thank you! Questions?

24 / 24

Page 137: Integrating Heterogeneous Data by Extending Semantic Web Standards

Bibliography I

Stefan Bischof, Stefan Decker, Thomas Krennwallner, NunoLopes, and Axel Polleres.Mapping between RDF and XML with XSPARQL.Journal on Data Semantics, 1:147–185, 2012.

Sven Groppe, Jinghua Groppe, Volker Linnemann, DirkKukulenz, Nils Hoeller, and Christoph Reinke.Embedding SPARQL into XQuery/XSLT.In Roger L. Wainwright and Hisham Haddad, editors,Proceedings of the 2008 ACM Symposium on AppliedComputing (SAC), Fortaleza, Ceara, Brazil, March 16-20,2008, pages 2271–2278. ACM, 2008.

Page 138: Integrating Heterogeneous Data by Extending Semantic Web Standards

Bibliography II

Nuno Lopes, Stefan Bischof, Stefan Decker, and Axel Polleres.On the Semantics of Heterogeneous Querying of Relational,XML and RDF Data with XSPARQL.In Paulo Moura and Vitor Beires Nogueira, editors,Proceedings of the 15th Portuguese Conference on ArtificialIntelligence (EPIA2011) – Computational Logic withApplications Track, Lisbon, Portugal, October 2011.

Nuno Lopes, Sabrina Kirrane, Antoine Zimmermann, AxelPolleres, and Alessandra Mileo.A Logic Programming approach for Access Control over RDF.In Agostino Dovier and Vıtor Santos Costa, editors, TechnicalCommunications of the 28th International Conference on LogicProgramming (ICLP’12), volume 17 of Leibniz InternationalProceedings in Informatics (LIPIcs), pages 381–392, Dagstuhl,

Page 139: Integrating Heterogeneous Data by Extending Semantic Web Standards

Bibliography III

Germany, 2012. Schloss Dagstuhl–Leibniz-Zentrum fuerInformatik.

Nuno Lopes, Axel Polleres, Umberto Straccia, and AntoineZimmermann.AnQL: SPARQLing Up Annotated RDFS.In International Semantic Web Conference (1), pages 518–533,2010.

Umberto Straccia, Nuno Lopes, Gergely Lukacsy, and AxelPolleres.A General Framework for Representing and Reasoning withAnnotated Semantic Web Data.In Maria Fox and David Poole, editors, Proceedings of theTwenty-Fourth AAAI Conference on Artificial Intelligence,AAAI 2010, Atlanta, Georgia, USA, July 11-15, 2010. AAAIPress, July 2010.

Page 140: Integrating Heterogeneous Data by Extending Semantic Web Standards

Bibliography IV

Antoine Zimmermann, Nuno Lopes, Axel Polleres, andUmberto Straccia.A General Framework for Representing, Reasoning andQuerying with Annotated Semantic Web Data.Web Semantics: Science, Services and Agents on the WorldWide Web, 11(0):72–95, 2012.