en:site:recherche:logiciels:sparqlwithspark:star
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:site:recherche:logiciels:sparqlwithspark:star [13/09/2016 23:32] – 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====== |
- | Star with 3 branches | + | === SPARQL SQL for a star with 3 branches |
- | < | + | < |
- | SELECT | + | SELECT |
- | WHERE { | + | FROM triple t1, triple t2, triple t3 |
- | ?x < | + | WHERE t1.p LIKE '< |
- | ? | + | AND t1.o LIKE '< |
- | ? | + | AND t2.p LIKE '<http://xmlns.com/foaf/0.1/page> <http://dbpedia.org/page/ |
+ | AND t3.p LIKE '< | ||
+ | AND t1.s=t2.s AND t1.s=t3.s; | ||
</ | </ | ||
- | in SQL | ||
- | < | ||
- | SELECT t1.s, t2.o, t3.o FROM triple t1, triple t2, triple t3 WHERE t1.p LIKE '< | ||
- | </ | ||
- | Star with 5 branches | ||
- | < | ||
- | SELECT ?x ?a ?b ?c ?d | ||
- | WHERE { | ||
- | ?x < | ||
- | ?x < | ||
- | ? | ||
- | ?x < | ||
- | ?x < | ||
- | } | ||
- | </ | ||
- | |||
- | Star with 10 branches | ||
- | < | ||
- | SELECT ?x ?a ?b ?c ?d ?g ?h ?i | ||
- | WHERE { | ||
- | ?x < | ||
- | ?x < | ||
- | ? | ||
- | ?x < | ||
- | ?x < | ||
- | ?x < | ||
- | ?x < | ||
- | ?x < | ||
- | ?x < | ||
- | ?x < | ||
- | } | ||
- | </ | ||
- | |||
- | Star with 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 < | ||
- | </ | ||
- | ===== Plans ===== | + | ==== 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 392: | Line 341: | ||
</ | </ | ||
+ | Go to [[en: |
en/site/recherche/logiciels/sparqlwithspark/star.1473802362.txt.gz · Last modified: by hubert