2

フィールドで、この2つのテーブルから結合する必要がありますID_CLIENTI。MySQL DB 上のこれらのテーブルは、タートル ファイル内の 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.

}

ただし、行が見つからないことを返します。

4

0 に答える 0