sparql连接查询解释如何工作? [英] sparql join query explanation hows its working?

查看:171
本文介绍了sparql连接查询解释如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的查询:

  select?x?z 
其中
{
? x< http://purl.uniprot.org/core/name> ?y。
?x< http://purl.uniprot.org/core/volume> ?z。
?x< http://purl.uniprot.org/core/pages> 176-186。
}

我需要为此查询制作自定义分析器。



当我在jena模型上执行此查询时,它会返回一条记录。
任何人都可以解释这个查询实现吗?



我把这个查询分成三部分:

  select?x?y其中{?x  
找到的记录总数:3034

select?x?z其中{?x
找到的记录总数:2679

select?x?z其中{?x< http://purl.uniprot.org/core/name> ?y。 ?x< http://purl.uniprot.org/core/volume> ?z。 ?x< http://purl.uniprot.org/core/pages> 176-186。 }

找到的总记录数:1

请帮助我自定义查询解析器。

解决方案

您试图计算三个三重模式的连接。关于通过Apache Hadoop实现连接的论文将是有用的背景。



查看Apache Spark和弹性分布式数据集(RDD)概念可能很有帮助。 b
$ b

考虑每种模式的可能选择性也很重要 - 正如Joshua所说,页面模式可能会产生一个独特的解决方案,并用它来简单地查找每个名称和音量并不是一项艰巨的任务。

ARQ的内存中算法并不是针对Hadoop上的最大独立并行性。合并连接(或排序合并连接)可对数据进行两次并行访问。



您可以在基本模式级别或整个代数执行级别扩展ARQ,或任何点之间,通过扩展类 OpExecutor


My query:

select ?x ?z
where
{
  ?x <http://purl.uniprot.org/core/name> ?y .
  ?x <http://purl.uniprot.org/core/volume> ?z .
  ?x <http://purl.uniprot.org/core/pages> "176-186" .
}

I required to make custom parser for this query.

When I do this query on jena model, it returns one record. Can anyone explain this query implementation?

I split out this query into three parts:

select ?x ?y where { ?x <http://purl.uniprot.org/core/name> ?y . }

Total Records Found : 3034

select ?x ?z where { ?x <http://purl.uniprot.org/core/name> ?y . ?x <http://purl.uniprot.org/core/volume> ?z . }

 Total Records Found : 2679

select ?x ?z where { ?x <http://purl.uniprot.org/core/name> ?y . ?x <http://purl.uniprot.org/core/volume> ?z . ?x <http://purl.uniprot.org/core/pages> "176-186" . }

 Total Records Found : 1

Please help me to make custom query parser.

解决方案

You are trying to calculate the join of the three triple patterns. Papers on join implementation over Apache Hadoop will be useful background.

It may helpful to look at Apache Spark and the Resilient Distributed Dataset (RDD) concept.

It is also important to consider likely selectivity of each pattern - as Joshua says, the "pages" pattern may well be yield a unique solution and using that to simply lookup each of "name" and "volume" is not a demanding task.

ARQ's in-memory algorithm is not aiming for maximum independent parallelism which is what you want on Hadoop. Merge joins (or sort-merge joins) make two parallelizable accesses to the data.

You can extend ARQ at the basic pattern level or at the whole algebra execution level, or any point in between, by extends class OpExecutor.

这篇关于sparql连接查询解释如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆