include - 包括来自单独文件的 sparql 子查询

标签 include subquery rdf sparql redundancy

复杂的 SPARQL 查询构建起来很费力,而且难以阅读。有没有办法在 SPARQL 中“包含”子查询,例如使用“include queryX”行,这样可以避免每次在单独的更复杂的查询中写出重复的简单查询?

最佳答案

SPARQL FAQ提到了以下可能性:

A very limited form of subqueries can be accomplished with SPARQL engines that will perform HTTP GETs upon graphs named in FROM or FROM NAMED clauses by creating a URL consisting of an embedded SPARQL CONSTRUCT query submitted to a SPARQL endpoint and supplying this URL as part of the RDF dataset being queried. In practice, this technique is often inefficient and is subject to possible URL-maximum-length restrictions of the involved software.



W3C wiki还提到了一些其他可能的解决方法。

关于include - 包括来自单独文件的 sparql 子查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13198902/

相关文章:

c++ - header 未被识别

header - 处理 biicode 中 Unresolved 平台相关依赖项

mysql - 多对多关系的联接或多查询

java - Jena:以编程方式构建查询时的属性路径

java - 如何将 rdf xml 转换为 n-triples?

asp.net - 如何在网页上调用 #include virtual 时使用变量?

mysql - 如何将这两个查询组合在一起? (MySQL)

mysql - 如何返回mysql子查询的行数

python - SPARQL 查询给出意外结果

c++ - 找不到包含文件