3

假设我有一个来自关系数据库的表。

在 MarkLogic 8 中将这些映射到三元组/RDF 的首选方法是什么?

所以而不是:

<orders>
  <order>
    <number>1</number>
    <name>Sam Smith</name>
  </order>
....
</orders>

我最终得到:

<triples>
  <triple>
    <subject>http://example.com/order</subject>
    <predicate>http://example.com/order/number</predicate>
    <object datatype="http://www.w3.org/2001/XMLSchema#integer">1</object>
  </triple>
  <triple>
    <subject>http://example.com/order</subject>
    <predicate>http://example.com/order/name</predicate>
    <object datatype="http://www.w3.org/2001/XMLSchema#string">Sam Smith</object>
  </triple>
  ....
</triples>

我需要知道这是否是我们只需要手动开发的东西,还是有工具来提供映射和命名空间并生成它们?

4

1 回答 1

2

If you do not want to keep the original documents (and enrich them with triples), but instead to store only triples, the easiest is to generate the triples. The preferred way to do this is indeed to generate the sem:triples documents yourself.

The key point to take into account is how to group triples in a document. As triples are stored in a document, like any other document in MarkLogic, grouping them in logical units makes it easy to "insert them all together", or "delete them all together".

This depends on the entities you are representing (at the conceptual level) and the relations between them.

于 2015-06-03T19:39:41.057 回答