是否可以在SPARQL中返回两个对象之间的关系? [英] Is it possible to return relationships between two objects in SPARQL?

查看:97
本文介绍了是否可以在SPARQL中返回两个对象之间的关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是SPARQL的初学者,我想知道是否有可能返回两个对象之间的关系。例如,我想编写一个SPARQL查询,该查询返回dbpedia中Thierry Henry和阿森纳之间的关系。

I am a beginner in SPARQL and I would like to know if it is possible to return relationships between two objects. For example I would like to write a SPARQL query which returns the relationship between Thierry Henry and Arsenal in dbpedia.

推荐答案

SELECT ?relationship
WHERE {
  <http://dbpedia.org/resource/Thierry_Henry> 
  ?relationship 
  <http://dbpedia.org/resource/Arsenal_F.C.>
}

即:


向我显示谓词(?关系),其中主题是DBPedia资源 Thierry_Henry 而对象是DBPedia资源 Arsenal_F.C。

show me the predicates (?relationship) where the subject is the DBPedia resource Thierry_Henry and the object is the DBPedia resource Arsenal_F.C.

..结果到:

dbpedia:ontology/team
dbpedia2:clubs

..这显然意味着蒂埃里·亨利(Thierry Henry)是阿森纳球队的成员,并且属于阿森纳足球俱乐部。在 DBPedia SPARQL Explorer

..which apparently means that Thierry Henry was part of the Arsenal team and belonged to the Arsenal Football Club. See the result on DBPedia SPARQL Explorer.

这篇关于是否可以在SPARQL中返回两个对象之间的关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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