en:site:recherche:logiciels:sparqlwithspark:star
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:site:recherche:logiciels:sparqlwithspark:star [13/09/2016 23:29] – created hubert | en:site:recherche:logiciels:sparqlwithspark:star [16/09/2016 23:09] (current) – [SPARQL Hybrid DF : plan for Spark v1.5] hubert | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | Star shape queries over DrugBank | + | {{indexmenu_n> |
- | SPARQL queries | + | ====== Star shape query plans====== |
- | // Query star 1 (3 branches) | + | |
- | < | + | |
- | SELECT ?x ?a ?b | + | |
- | WHERE { | + | |
- | ?x < | + | |
- | ?x < | + | |
- | ? | + | |
- | </ | + | |
- | // in SQL | + | === SPARQL |
- | < | + | |
- | SELECT t1.s, t2.o, t3.o FROM triple t1, triple t2, triple t3 WHERE t1.p LIKE '< | + | |
- | </ | + | |
- | // Query star 1 (5 branches) | + | < |
- | < | + | SELECT |
- | SELECT | + | FROM triple t1, triple t2, triple t3 |
- | WHERE { | + | WHERE t1.p LIKE '< |
- | ?x < | + | AND t1.o LIKE '< |
- | ?x <http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/ | + | AND t2.p LIKE '<http://xmlns.com/foaf/0.1/page> <http://dbpedia.org/page/Ibuprofen>' |
- | ? | + | AND t3.p LIKE '< |
- | ? | + | AND t1.s=t2.s AND t1.s=t3.s; |
- | ?x < | + | |
- | } | + | |
</ | </ | ||
- | // Query star 1 (10 branches) | ||
- | < | ||
- | SELECT ?x ?a ?b ?c ?d ?g ?h ?i | ||
- | WHERE { | ||
- | ?x < | ||
- | ?x < | ||
- | ? | ||
- | ?x < | ||
- | ?x < | ||
- | ?x < | ||
- | ?x < | ||
- | ?x < | ||
- | ?x < | ||
- | ?x < | ||
- | } | ||
- | </ | ||
- | // Query star 1 (15 branches) | ||
- | < | ||
- | SELECT ?x ?a ?b ?c ?d ?g ?h ?i ?j ?k ?l | ||
- | WHERE { | ||
- | ?x < | ||
- | ?x < | ||
- | ? | ||
- | ?x < | ||
- | ?x < | ||
- | ?x < | ||
- | ?x < | ||
- | ?x < | ||
- | ?x < | ||
- | ?x < | ||
- | ?x < | ||
- | ?x < | ||
- | ?x < | ||
- | ?x < | ||
- | ?x < | ||
- | </ | ||
- | Scala code: | + | ==== SPARQL Hybrid DF : plan for Spark v1.5==== |
- | < | + | < |
import scala.collection.mutable.ListBuffer | import scala.collection.mutable.ListBuffer | ||
import scala.collection.mutable.ArrayBuffer | import scala.collection.mutable.ArrayBuffer | ||
Line 390: | Line 341: | ||
</ | </ | ||
+ | Go to [[en: |
en/site/recherche/logiciels/sparqlwithspark/star.1473802143.txt.gz · Last modified: by hubert