CrossDomain 1:

Find all information about Barack Obama.

SELECT ?predicate ?object WHERE {

{ dbpedia:Barack_Obama ?predicate ?object }

UNION

{ ?subject owl:sameAs dbpedia:Barack_Obama .

?subject ?predicate ?object } }

FedX/Splendid/Semagrow Plan:

{ dbpedia:Barack_Obama ?predicate ?object } @ Dbpedia

UNION {

{ ?subject owl:sameAs dbpedia:Barack_Obama . } @ NYTimes

BJOIN

{ ?subject ?predicate ?object } @ Dbpedia, Geonames, Jamendo, LinkedMDB, NYTimes

}

CrossDomain 2:

Return Barack Obama's party membership and news pages.

SELECT ?party ?page WHERE {

dbpedia:Barack_Obama dbpedia-owl:party ?party .

?x nytimes:topicPage ?page .

?x owl:sameAs dbpedia:Barack_Obama }

FedX/Splendid Plan:

{?x nytimes:topicPage ?page .

?x owl:sameAs dbpedia:Barack_Obama } @ NYTimes

BJOIN

{ dbpedia:Barack_Obama dbpedia-owl:party ?party . } @ DBpedia

SemaGrow Plan:

{?x owl:sameAs dbpedia:Barack_Obama

?x nytimes:topicPage ?page . } @ NYTimes

BJOIN

{ dbpedia:Barack_Obama dbpedia-owl:party ?party . } @ DBpedia

CrossDomain 3:

Return for all US presidents their party membership and news pages about them.

SELECT ?pres ?party ?page WHERE {

?pres rdf:type dbpedia-owl:President .

?pres dbpedia-owl:nationality dbpedia:United_States .

?pres dbpedia-owl:party ?party .

?x nytimes:topicPage ?page .

?x owl:sameAs ?pres }

FedX Plan:

{?pres rdf:type dbpedia-owl:President .

?pres dbpedia-owl:nationality dbpedia:United_States .

?pres dbpedia-owl:party ?party . } @ DBpedia

BJOIN

{?x owl:sameAs ?pres } @ Dbpedia, Geonames, Jamendo, LinkedMDB, NYTimes

BJOIN

{?x nytimes:topicPage ?page . } @ NYTimes

Splendid Plan:

{?pres dbpedia-owl:nationality dbpedia:United_States .

?pres dbpedia-owl:party ?party .

?pres rdf:type dbpedia-owl:President .} @ DBpedia

BJOIN

{?x nytimes:topicPage ?page .

?x owl:sameAs ?pres. } @ NYTimes

SemaGrow Plan: change?

{?pres dbpedia-owl:nationality dbpedia:United_States .

?pres dbpedia-owl:party ?party .

?pres rdf:type dbpedia-owl:President . } @ Dbpedia

BJOIN

{?x nytimes:topicPage ?page . } @ NYTimes

BJOIN

{?x owl:sameAs ?pres } @ Dbpedia, Geonames, Jamendo, LinkedMDB, NYTimes

FedX optimizer generates a better plan than our Decomposer. FedX joins all US presidents with their corresponding news pages, while SemaGrow does the opposite (joins all with the news pages with the US presidents).

FedX: The first subquery at Dbpedia returns 10 triples. The second subquery returns 2 triples, because we have bindings for the variable ?pres. Finally, the third subquery at NYTimes returns 2 triples, because we have bindings for the variable ?pres.

SemaGrow: The first subquery at Dbpedia returns 10 triples. The second subquery at NYTimes returns 7432 triples (all news pages), because the variables ?x and ?page are unbinded. Finally, the third subquery returns 2 triples, because now we have bindings for the variables ?page and ?pres. However, the evaluation of this subquery is very slow, because we have to pass all bindigs for the variable ?page (which are equal to 7432) to every dataset that contains the sameAs predicate.

Reason: Optimizer error (the optimizer prefers to perform a join without common free variables).

CrossDomain 4:

Find all news about actors starring in a movie with name Tarzan.

SELECT ?actor ?news WHERE {

?film purl:title 'Tarzan' .

?film linkedMDB:actor ?actor .

?actor owl:sameAs ?x.

?y owl:sameAs ?x .

?y nytimes:topicPage ?news }

FedX/SemaGrow Plan:

{?film purl:title 'Tarzan' .

?film linkedMDB:actor ?actor . } @ LinkedMDB

BJOIN

{?actor owl:sameAs ?x. } @ Dbpedia, Geonames, Jamendo, LinkedMDB, NYTimes

BJOIN

{?y owl:sameAs ?x .} @ Dbpedia, Geonames, Jamendo, LinkedMDB, NYTimes

BJOIN

{?y nytimes:topicPage ?news } @ NYTimes

Splendid Plan:

{?film linkedMDB:actor ?actor .

?actor owl:sameAs ?x.

?film purl:title 'Tarzan' . } @ LinkedMDB

BJOIN

{?y nytimes:topicPage ?news

?y owl:sameAs ?x .} @ NYTimes

CrossDomain 5:

Find the director and the genre of movies directed by Italians.

SELECT ?film ?director ?genre WHERE {

?film dbpedia-owl:director ?director.

?director dbpedia-owl:nationality dbpedia:Italy .

?x owl:sameAs ?film .

?x linkedMDB:genre ?genre }

FedX/SemaGrow Plan:

{?film dbpedia-owl:director ?director.

?director dbpedia-owl:nationality dbpedia:Italy . } @ Dbpedia

BJOIN

{?x owl:sameAs ?film . } @ Dbpedia, Geonames, Jamendo, LinkedMDB, NYTimes

BJOIN

{?x linkedMDB:genre ?genre } @ LinkedMDB

Splendid Plan:

{?director dbpedia-owl:nationality dbpedia:Italy .

?film dbpedia-owl:director ?director. } @ Dbpedia

BJOIN

{?x linkedMDB:genre ?genre

?x owl:sameAs ?film . } @ LinkedMDB

FedX and SemaGrow generate the same plan.

CrossDomain 6:

Find all musical artists based in Germany.

SELECT ?name ?location ?news WHERE {

?artist foaf:name ?name .

?artist foaf:based_near ?location .

?location geonames:parentFeature ?germany .

?germany geonames:name 'Federal Republic of Germany' }

FedX/SemaGrow/Splendid Plan:

{ ?germany geonames:name 'Federal Republic of Germany' } @ Geonames

BJOIN

{ ?location geonames:parentFeature ?germany .} @ Geonames, NYTimes

BJOIN

{ ?artist foaf:based_near ?location . } @ Jamendo, LinkedMDB

BJOIN

{ ?artist foaf:name ?name . } @ Dbpedia, Jamendo

CrossDomain 7:

Find all news about locations in the state of California.

SELECT ?location ?news WHERE {

?location geonames:parentFeature ?parent .

?parent geonames:name 'California' .

?y owl:sameAs ?location.

?y nytimes:topicPage ?news }

FedX/SemaGrow Plan:

{ ?parent geonames:name 'California' .} @ Geonames, NYTimes

BJOIN

{ ?location geonames:parentFeature ?parent . } @ Geonames, NYTimes

BJOIN

{ ?y owl:sameAs ?location. } @ Dbpedia, Geonames, Jamendo, LinkedMDB, NYTimes

BJOIN

{ ?y nytimes:topicPage ?news } @ NYTimes

SemaGrow Plan:

{?parent geonames:name 'California' .} @ Geonames, NYTimes

BJOIN

{?location geonames:parentFeature ?parent . } @ Geonames, NYTimes

BJOIN

{?y nytimes:topicPage ?news .

?y owl:sameAs ?location. } @ NYTimes

FedX and SemaGrow generate the same plan.

LifeScience 1: TODO

Find all drugs from Drugbank and DBpedia with their melting points.

SELECT ?drug ?melt WHERE {

{ ?drug drugbank:meltingPoint ?melt . }

UNION

{ ?drug dbpedia-owl-drug:meltingPoint ?melt . } }

FedX/Splendid Plan:

{ ?drug drugbank:meltingPoint ?melt . } @ Drugbank

SemaGrow Plan:

{ ?drug drugbank:meltingPoint ?melt . } @ Drugbank

UNION {}

FedX and SemaGrow generate similar plans.

LifeScience 2:

Find all information about drugbank-drugs:DB00201 (Caffeine).

SELECT ?predicate ?object WHERE {

{ drugbank-drugs:DB00201 ?predicate ?object . }

UNION

{ drugbank-drugs:DB00201 owl:sameAs ?caff .

?caff ?predicate ?object . }

}

FedX/SemaGrow/Splendid Plan:

{ drugbank-drugs:DB00201 ?predicate ?object . } @ Drugbank

UNION {

{ drugbank-drugs:DB00201 owl:sameAs ?caff .} @ Drugbank

BJOIN

{ ?caff ?predicate ?object . } @ Dbpedia, Drugbank, KEGG, ChEBI

}

LifeScience 3: TODO

For all drugs in DBpedia, find all drugs they interact with, along with an explanation of the interaction.

SELECT ?Drug ?IntDrug ?IntEffect WHERE {

?Drug rdf:type dbpedia-owl:Drug .

?y owl:sameAs ?Drug .

?Int drugbank:interactionDrug1 ?y .

?Int drugbank:interactionDrug2 ?IntDrug .

?Int drugbank:text ?IntEffect . }

FedX Plan:

{ ?Drug rdf:type dbpedia-owl:Drug . } @ Dbpedia

BJOIN

{ ?y owl:sameAs ?Drug . } @ Dbpedia, DrugBank, KEGG

BJOIN

{?Int drugbank:interactionDrug1 ?y .

?Int drugbank:interactionDrug2 ?IntDrug .

?Int drugbank:text ?IntEffect . } @ DrugBank

SemaGrow Plan:

{ ?Drug rdf:type dbpedia-owl:Drug . } @ Dbpedia

BJOIN

{ ?y owl:sameAs ?Drug . } @ Dbpedia, DrugBank, KEGG

BJOIN

{?Int drugbank:interactionDrug2 ?IntDrug .

?Int drugbank:interactionDrug1 ?y .

?Int drugbank:text ?IntEffect . } @ DrugBank

Splendid Plan:

{ ?Drug rdf:type dbpedia-owl:Drug . } @ Dbpedia

BJOIN

{?Int drugbank:interactionDrug1 ?y .

?y owl:sameAs ?Drug .

?Int drugbank:interactionDrug2 ?IntDrug .

?Int drugbank:text ?IntEffect . } @ DrugBank

LifeScience 4:

Find all the equations of reactions related to drugs from category Cathartics and their drug description.

SELECT ?drugDesc ?cpd ?equation WHERE {

?drug drugbank:drugCategory drugbank-category:cathartics .

?drug drugbank:keggCompoundId ?cpd .

?drug drugbank:description ?drugDesc .

?enzyme kegg:xSubstrate ?cpd .

?enzyme rdf:type kegg:Enzyme .

?reaction kegg:xEnzyme ?enzyme .

?reaction kegg:equation ?equation . }

FedX Plan:

{?drug drugbank:drugCategory drugbank-category:cathartics .

?drug drugbank:keggCompoundId ?cpd .

?drug drugbank:description ?drugDesc } @DrugBank

BJOIN

{?enzyme kegg:xSubstrate ?cpd .

?enzyme rdf:type kegg:Enzyme .

?reaction kegg:xEnzyme ?enzyme .

?reaction kegg:equation ?equation . } @KEGG

Splendid Plan:

{?drug drugbank:keggCompoundId ?cpd .

?drug drugbank:description ?drugDesc.

?drug drugbank:drugCategory drugbank-category:cathartics . } @DrugBank

BJOIN

{?enzyme kegg:xSubstrate ?cpd .

?reaction kegg:equation ?equation .

?reaction kegg:xEnzyme ?enzyme .

?enzyme rdf:type kegg:Enzyme . } @KEGG

SemaGrow Plan:

{?drug drugbank:drugCategory drugbank-category:cathartics .

?drug drugbank:keggCompoundId ?cpd .

?drug drugbank:description ?drugDesc} @DrugBank

BJOIN

{?reaction kegg:equation ?equation .

?reaction kegg:xEnzyme ?enzyme .

?enzyme kegg:xSubstrate ?cpd .

?enzyme rdf:type kegg:Enzyme .} @KEGG

LifeScience 5:

Find all drugs from Drugbank, together with the URL of the corresponding page stored in KEGG and the URL to the image derived from ChEBI.

SELECT ?drug ?keggUrl ?chebiImage WHERE {

?drug rdf:type drugbank:drugs .

?drug drugbank:keggCompoundId ?keggDrug .

?keggDrug bio2rdf:url ?keggUrl .

?drug drugbank:genericName ?drugBankName .

?chebiDrug purl:title ?drugBankName .

?chebiDrug chebi:image ?chebiImage . }

FedX Plan:

{?drug rdf:type drugbank:drugs .

?drug drugbank:keggCompoundId ?keggDrug .

?drug drugbank:genericName ?drugBankName . } @ DrugBank

BJOIN

{ ?keggDrug bio2rdf:url ?keggUrl . } @ KEGG, ChEBI

BJOIN

{ ?chebiDrug purl:title ?drugBankName . } @ KEGG, ChEBI

BJOIN

{ ?chebiDrug chebi:image ?chebiImage . } @ ChEBI

Splendid Plan:

{?drug drugbank:genericName ?drugBankName .

?drug drugbank:keggCompoundId ?keggDrug .

?drug rdf:type drugbank:drugs .} @ DrugBank

BJOIN

{ ?chebiDrug purl:title ?drugBankName . } @ KEGG, ChEBI

BJOIN

{ ?chebiDrug chebi:image ?chebiImage . } @ ChEBI

BJOIN

{ ?keggDrug bio2rdf:url ?keggUrl . } @ KEGG, ChEBI

SemaGrow Plan:

{?drug drugbank:keggCompoundId ?keggDrug .

?drug drugbank:genericName ?drugBankName .

?drug rdf:type drugbank:drugs .} @ DrugBank

BJOIN

{ ?chebiDrug purl:title ?drugBankName . } @ KEGG, ChEBI

BJOIN

{ ?chebiDrug chebi:image ?chebiImage . } @ ChEBI

BJOIN

{ ?keggDrug bio2rdf:url ?keggUrl . } @ KEGG, ChEBI

LifeScience 6:

Find KEGG drug names of all drugs in Drugbank belonging to category Micronutrient.

SELECT ?drug ?title WHERE {

?drug drugbank:drugCategory drugbank-category:micronutrient .

?drug drugbank:casRegistryNumber ?id .

?keggDrug rdf:type kegg:Drug .

?keggDrug bio2rdf:xRef ?id .

?keggDrug purl:title ?title . }

FedX Plan:

{?drug drugbank:drugCategory drugbank-category:micronutrient .

?drug drugbank:casRegistryNumber ?id . } @ DrugBank

BJOIN

{?keggDrug rdf:type kegg:Drug . } @ KEGG

BJOIN

{?keggDrug bio2rdf:xRef ?id . } @ KEGG,ChEBI

BJOIN

{ ?keggDrug purl:title ?title . } @ KEGG,ChEBI

Splendid Plan:

{?drug drugbank:casRegistryNumber ?id .

?drug drugbank:drugCategory drugbank-category:micronutrient .} @ DrugBank

BJOIN

{?keggDrug bio2rdf:xRef ?id . } @ KEGG,ChEBI

BJOIN

{?keggDrug rdf:type kegg:Drug . } @ KEGG

BJOIN

{ ?keggDrug purl:title ?title . } @ KEGG,ChEBI

SemaGrow Plan:

{?drug drugbank:drugCategory drugbank-category:micronutrient .

?drug drugbank:casRegistryNumber ?id . } @ DrugBank

BJOIN

{?keggDrug bio2rdf:xRef ?id . } @ KEGG,ChEBI

BJOIN

{?keggDrug rdf:type kegg:Drug . } @ KEGG

BJOIN

{ ?keggDrug purl:title ?title . } @ KEGG,ChEBI

LifeScience 7:

SELECT ?drug ?transform ?mass WHERE {

?drug drugbank:affectedOrganism 'Humans and other mammals'.

?drug drugbank:casRegistryNumber ?cas .

?keggDrug bio2rdf:xRef ?cas .

?keggDrug bio2rdf:mass ?mass

FILTER ( ?mass > '5' )

OPTIONAL { ?drug drugbank:biotransformation ?transform . } }

FedX Plan:

{?drug drugbank:affectedOrganism 'Humans and other mammals'.

?drug drugbank:casRegistryNumber ?cas . } @ DrugBank

BJOIN

{?keggDrug bio2rdf:xRef ?cas . } @ KEGG, ChEBI

BJOIN

{ ?keggDrug bio2rdf:mass ?mass

FILTER ( ?mass > '5' ) } @ KEGG

BJOIN

{ ?drug drugbank:biotransformation ?transform . } @ DrugBank

Splendid Plan:

{{?drug drugbank:affectedOrganism 'Humans and other mammals'.

?drug drugbank:casRegistryNumber ?cas . } @ DrugBank

BJOIN

{?keggDrug bio2rdf:xRef ?cas . } @ KEGG, ChEBI

BJOIN

{ ?keggDrug bio2rdf:mass ?mass

FILTER ( ?mass > '5' ) } @ KEGG }

LJOIN

{ ?drug drugbank:biotransformation ?transform . } @ DrugBank

SemaGrow Plan:

{?drug drugbank:affectedOrganism 'Humans and other mammals'. } @ DrugBank

BJOIN

{?drug drugbank:casRegistryNumber ?cas . } @ DrugBank

BJOIN

{?keggDrug bio2rdf:xRef ?cas . } @ KEGG, ChEBI

BJOIN

{ ?keggDrug bio2rdf:mass ?mass

FILTER ( ?mass > '5' ) } @ KEGG

BJOIN

{ ?drug drugbank:biotransformation ?transform . } @ DrugBank