W3C home > Mailing lists > Public > www-rdf-interest@w3.org > May 2001

RE: relational mapping?

From: Danny Ayers <danny@panlanka.net>
Date: Thu, 3 May 2001 22:58:43 +0600
To: "Jan Grant" <Jan.Grant@bristol.ac.uk>
Cc: "Www-Rdf-Logic" <www-rdf-logic@w3.org>, "RDF-Interest" <www-rdf-interest@w3.org>
Message-ID: <EBEPLGMHCDOJJJPCFHEFGEMBDEAA.danny@panlanka.net>
<- I've done quite a bit of thinking about it; got some paper notes which
<- I'm in the (slow) process of typing up. You're right, there's a simple
<- mechanical mapping of rows in a table to RDF; what you lose by this is
<- the natural linking of properties.

Not sure I understand - linking of properties in the RDF?

<- For a sufficiently normalised relational schema*, you can generally
<- produce a mapping
<- 	(primary key) -> resource
<- 	(other values) -> properties
<- 	(foreign key) -> link to resource representing primary key for
<- 			foreign table

Great - this looks very promising, just the kind of thing I was looking for,
I'm going to have to get pencil & paper.

<- * that is, very (what, fifth NF?): for instance, moving one-to-one data
<- into a separate table if the data describes a separate concept; it's
<- generally possible to produce a normalised schema from a less normalised
<- (ie, more real-world) one with the judicious use of views.

Ugh! I've been postponing re-reading on the later NFs, hoping I wouldn't
have to. Rats.

I foolishly didn't say what I was wanting to do with the mapping - off list
I've been mailed some good links for going RDF -> RDBMS (thanks!), but I'm
really looking at RDBMS -> RDF and (as you seem to have mind-read) was
wondering whether there was a way up from relational <-> RDF model.

The plan is to expose a RDBMS, starting with metadata, trying to preserve as
much of the logical structure as possible. I'm currently thinking this way :
pump out the top-level information as RDF, linked down to a dynamically
generated XML Schema that will pass on the constraints for any actual data
requested, which will in turn be presented as straight XML. I reckon if I
can get the RDF right, the rest should follow mechanically. Hopefully ;-)

I was considering doing the mapping within the DB, generating a table of
triple using the logical capabilities of the RDBMS. This is very appealing
from the point of view of integrity (& probably efficiency), but the stuff
will still need to be poured out in a form that other systems will
understand, and application-level constraints will almost certainly be
needed at the other end anyway, so it's code-hacking time whatever happens.

Thanks for the info. Now where's that pencil...
Received on Thursday, 3 May 2001 13:03:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:49 GMT