对存储在关系数据库中的rdf数据执行sparql查询 [英] performing sparql query on the rdf data stored in relational database

查看:124
本文介绍了对存储在关系数据库中的rdf数据执行sparql查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在rdflib_sqlalchemy.SQLAlchemy的帮助下将大量RDF数据存储到关系数据库中.现在,我想在同一位置执行Sparql查询.在这里我找不到任何东西可以知道如何实现sparql查询. 谁能帮忙.

I have stored large amount of RDF data into a relational database with the help of rdflib_sqlalchemy.SQLAlchemy.Now I want to execute Sparql query over the same.I can not find any thing to know how to implement sparql query here. Can anyone help.

推荐答案

包含示例代码可以使您更轻松地了解自己所追求的,但是请参阅

Including sample code would make it easier to know what you are after but see the documentation on querying an RDFLib graph with SPARQL.

使用rdflib-sqlalchemy中的示例自述文件,其中graph是打开图的名称.

Using the example from the rdflib-sqlalchemy README where graph is the name of the open graph.

rq = "select ?s where {?s ?p ?o} limit 10"

results = graph.query(rq)
for row in results:
    print row.s

这篇关于对存储在关系数据库中的rdf数据执行sparql查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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