mysql支持sparql吗_D2R Server-Sparql加入生成映射数据库MySQL

这篇博客讨论了如何在MySQL数据库上使用D2R Server映射表,并通过SPARQL查询进行连接操作。内容涉及了CLIENTI和FATTURE两个表的映射配置,并给出了一个未返回预期结果的SPARQL查询示例。
摘要由CSDN通过智能技术生成

我必须在ID_CLIENTI这个字段上从这两个表中进行连接。 MySQL数据库上的这些表使用turtle文件的D2R服务器上的生成映射进行映射。

Table CLIENTI

map:CLIENTI a d2rq:ClassMap;

d2rq:dataStorage map:database;

d2rq:uriPattern "CLIENTI/@@CLIENTI.ID_CLIENTI@@";

d2rq:class vocab:CLIENTI;

d2rq:classDefinitionLabel "CLIENTI";

. map:CLIENTI__label a d2rq:PropertyBridge; d2rq:belongsToClassMap map:CLIENTI; d2rq:property rdfs:label; d2rq:pattern "CLIENTI #@@CLIENTI.ID_CLIENTI@@"; .

map:CLIENTI_ID_CLIENTI a d2rq:PropertyBridge;

d2rq:belongsToClassMap map:CLIENTI;

d2rq:property vocab:CLIENTI_ID_CLIENTI;

d2rq:propertyDefinitionLabel "CLIENTI ID_CLIENTI";

d2rq:column "CLIENTI.ID_CLIENTI";

d2rq:datatype xsd:integer;

.

map:CLIENTI_COGNOME a d2rq:PropertyBridge;

d2rq:belongsToClassMap map:CLIENTI;

d2rq:property vocab:CLIENTI_COGNOME;

d2rq:propertyDefinitionLabel "CLIENTI COGNOME";

d2rq:column "CLIENTI.COGNOME";

.

Table FATTURE

map:FATTURE a d2rq:ClassMap;

d2rq:dataStorage map:database;

d2rq:uriPattern "FATTURE/@@FATTURE.ID_FATTURE@@";

d2rq:class vocab:FATTURE;

d2rq:classDefinitionLabel "FATTURE";

.

map:FATTURE__label a d2rq:PropertyBridge;

d2rq:belongsToClassMap map:CLIENTI;

d2rq:property rdfs:label;

d2rq:pattern "FATTURE #@@FATTURE.ID_FATTURE@@";

.

map:FATTURE_ID_FATTURE a d2rq:PropertyBridge;

d2rq:belongsToClassMap map:FATTURE;

d2rq:property vocab:FATTURE_ID_FATTURE;

d2rq:propertyDefinitionLabel "FATTURE ID_FATTURE";

d2rq:column "FATTURE.ID_FATTURE";

d2rq:datatype xsd:integer;

.

map:FATTURE_IMPORTO a d2rq:PropertyBridge;

d2rq:belongsToClassMap map:FATTURE;

d2rq:property vocab:FATTURE_IMPORTO;

d2rq:propertyDefinitionLabel "FATTURE IMPORTO";

d2rq:column "FATTURE.IMPORTO";

d2rq:datatype xsd:double;

.我的查询是:

SELECT ?cognome ?ID ?importo

WHERE {

?cognome2 vocab:CLIENTI_COGNOME ?cognome.

?cognome2 vocab:CLIENTI_ID_CLIENTI ?ID.

?cognome2 vocab:FATTURE_ID_CLIENTI ?importo.

}但是,它不返回找到的行。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值