我有一个数据库表,我正在将数据更改为 RDF。
到目前为止,我能够做到一对一,其中具有主键的行具有一个值,该值来自该行中的列,如下所示:
map:Artist a d2rq:ClassMap;
d2rq:dataStorage map:database;
d2rq:class to:Artist;
d2rq:uriPattern "to:Artist/@@M3.ARTIST.ARTIST_ID@@";
.
map:ArtistName a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:Artist;
d2rq:property to:hasName;
d2rq:column "M3.ARTIST.ARTIST_NAME";
d2rq:datatype xsd:string;
.
这里每个 Artist_ID 都将是三元组的主题,并且会有一个名为 hasName 的属性,其值来自 ARTIST_NAME 列
到目前为止一切顺利,现在我有一张很多很多这样的桌子:
艺术家(表) 专辑(表) 艺术家专辑(表)
该artistalbum 具有Album 和Artist 的外键
请问我该如何在 r2rq 中做到这一点?