【发布时间】:2018-03-08 05:51:54
【问题描述】:
假设我在我的 GraphDB 8.3 三元存储中进行了以下插入:
PREFIX : <http://example.com/>
insert data { :hello a :word }
和
PREFIX : <http://example.com/>
insert data { graph :farewells { :goodbye a :word }}
现在,如果我问
select * where {
graph ?g {
?s ?p ?o .
}
}
我只会得到
+--------------------------------+------------------------------+---------------------------------------------------+---------------------------+
| ?g | ?s | ?p | ?o |
+--------------------------------+------------------------------+---------------------------------------------------+---------------------------+
| <http://example.com/farewells> | <http://example.com/goodbye> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <http://example.com/word> |
+--------------------------------+------------------------------+---------------------------------------------------+---------------------------+
我显然可以通过以下方式获得“关于单词的三元组”,但是没有显示命名图成员身份
select * { ?s ?p ?o }
如何编写一个查询来检索关于单词的两个三元组并指示{ :goodbye a :word } 来自图形:farewells?
【问题讨论】:
标签: sparql rdf graphdb named-graphs