MarkLogic 8 - What is the preferred way to collect data

Let's say I have a table from a relational database.

What's the preferred method for matching them in triplets / RDF in MarkLogic 8?

So instead of:

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

      

I ended up:

<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>

      

I need to know if this is something that we only need to manually develop or are there tools to provide mappings and namespaces and generate them?

+3


source to share


1 answer


If you don't want to store the original documents (and enrich them with triplets), but instead store only triplets, the easiest way is to create triplets. The preferred way to do this is to actually generate sem: triples documents yourself.

The key point to consider is how to group the triplets in the document. Since triplets are stored in a document like any other document in MarkLogic, grouping them in logical units makes it easier to "insert them all together" or "delete them all together".



It depends on the entities you represent (conceptually) and the relationships between them.

+2


source







All Articles