如果数据集是:

@prefix dc:   <http://purl.org/dc/elements/1.1/> .
@prefix :     <http://example.org/book/> .
@prefix ns:   <http://example.org/ns#> .

:book1  dc:title  "SPARQL Tutorial" .
:book2  dc:title  "The Semantic Web" .

我如何检查三重:book1 dc:title "SPARQL Tutorial" .存在?

我可以做SELECT ?book where {?book dc:title "SPARQL Tutorial"}但然后我需要做的后处理,以确定是否“BOOK1”被检索!

有帮助吗?

解决方案

ASK  { ?book dc:title "SPARQL Tutorial" }
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top