This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:site:recherche:logiciels:sparqlwithspark:star [15/09/2016 16:07] hubert |
en:site:recherche:logiciels:sparqlwithspark:star [16/09/2016 23:09] (current) hubert [SPARQL Hybrid DF : plan for Spark v1.5] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{indexmenu_n>2}} | + | {{indexmenu_n>5}} |
- | ====== Star shape queries over DrugBank ====== | + | ====== Star shape query plans====== |
+ | |||
+ | === SPARQL SQL for a star with 3 branches === | ||
+ | |||
+ | <code sql> | ||
+ | SELECT t1.s, t2.o, t3.o | ||
+ | FROM triple t1, triple t2, triple t3 | ||
+ | WHERE t1.p LIKE '<http://xmlns.com/foaf/0.1/page>' | ||
+ | AND t1.o LIKE '<http://dbpedia.org/page/Ibuprofen>' | ||
+ | AND t2.p LIKE '<http://xmlns.com/foaf/0.1/page> <http://dbpedia.org/page/Ibuprofen>' | ||
+ | AND t3.p LIKE '<http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/casRegistryNumber>' | ||
+ | AND t1.s=t2.s AND t1.s=t3.s; | ||
+ | </code> | ||
- | SPARQL queries | ||
==== SPARQL Hybrid DF : plan for Spark v1.5==== | ==== SPARQL Hybrid DF : plan for Spark v1.5==== | ||
- | <code> | + | <code scala> |
import scala.collection.mutable.ListBuffer | import scala.collection.mutable.ListBuffer | ||
import scala.collection.mutable.ArrayBuffer | import scala.collection.mutable.ArrayBuffer |