RE: RDB structure to RDF mapping

I’m not aware of any specific ontologies: just metamodels (for example the Common Warehouse Metamodel [1]) that allow you to manage this sort of thing.

You should be aware that, if you’re trying to represent real world databases, the situation can get complex since a Key may consist of many Columns. And the same Column may be part of many Foreign Keys and also part of the Primary Key.
In summary a Table may contain many Foreign Keys, each of which consists of many Columns: one for each Column in the Primary Key of the referenced Table (the Columns may have different names).

So in your graph the link between 2 tables could in the general case be a set of pairs of columns.
Also you need to allow for loops – a Foreign Key could reference the Primary Key of the same Table.

Hope that helps,
Regards
Pete

[1] http://www.omg.org/spec/CWM/


Pete  Rivett (pete.rivett@adaptive.com<mailto:pete.rivett@adaptive.com>)
CTO, Adaptive Inc
cell: +1 949 338 3794
Follow me on Twitter @rivettp or http://twitter.com/rivettp





From: Alessandro Seganti [mailto:a.seganti@cognitum.eu]
Sent: Monday, April 18, 2016 8:25 AM
To: semantic-web@w3.org
Subject: RDB structure to RDF mapping

Hi everyone,
I want to formalize in RDF the table structure of a relational database. What I would like to do is to formalize the links that exists between all the tables inside a given relational database. This would result in a graph where the nodes are the tables and the links are the columns that can be used to join these tables.

My question is: is there some standard/ontology to describe this?

To my understanding the R2RML<https://www.w3.org/TR/r2rml/> ontology is to describe mappings between RDB and RDF (no RDB structure is mentioned). I also found a document about direct mapping<https://www.w3.org/TR/rdb-direct-mapping/> but no ontology is defined in this document.


Thank you for your help.

Alessandro Seganti Ph.D.

Cognitum Sp. z o.o., Data Engineer

mail: a.seganti@cognitum.eu<mailto:email@cognitum.eu>, tel: +48 22 250 2541, fax: +48 22 250 28 98

web: http://www.cognitum.eu/, fb: facebook.com/cognitum.eu<http://facebook.com/cognitum.eu>

Received on Tuesday, 19 April 2016 12:57:17 UTC