RE: relational mapping?

<- > Yep; I think this is what both Danny and I intimated was a "naieve"
<- > approach. It has the advantage of "just working"* for at least
<- > _producing_ RDF from an RDBMS. But it doesn't really capture any
<- > sematics that the RDBMS schema may be trying to describe. A row in a
<- > table may hold details (conceptually) about one or more resources
<- > (possibly just one, depending on which NF it is in). The use
<- of a middle
<- > table to model many-to-many tables has multiple potential
<- > representations in RDF; similarly, there are potentially several
<- > representations of a many-to-one relationship (just using
<- arcs, or using
<- > collections if that's more appropriate). To make these
<- choices, you need
<- > to really be aware of what the RDBMS schema is trying to
<- capture to make
<- > informed decisions about producing RDF from these.

I wouldn't have really called it naive (thanks, spellchecker) - more like
direct - a mapping across from relations,  n-tuples and domains to triples,
triples and more triples ;-) Anyhow I spent another couple of fruitless
hours on that approach and gave up. So I'm now trying an approach not unlike
Seth suggested. So far I've got Table and Column classes, (Table will
contain a load of Columns) a class Key (none/primary/secondary), property
isKey and a few other bits (I'm not bothering with records/values at all
here, I'll get a different layer to look after that).

If anything it seems a bit of a crude approach, I'm sure it would have been
much more elegant to go directly from one logical system to another. Anyhow,
I ain't got the skills so that's that. The target system (the web) doesn't
require perfection after all.

<- I think that the most appropriate way to do this would be to go
<- back to the
<- conceptual (ER or EER) schema and re-build the relational-RDF schema
<- for publishing relational data as RDF.

This is really what I was thinking of for the direct approach, I'm not even
sure that it needs to be expressed as ER/EER (I think Date [1] might have
had a rant somewhere about mismatchs between relational & ER, though I may
have imagined it).

<- Another approach would require interpretation of the relational schema
<- using metadata information.

That's exactly what I'm doing - populating the RDF instances (using Jena)
with info pulled from the (Java) DatabaseMetaData and ResultSetMetaData
classes in JDBC. It does seem a very kludgey way of doing things though -
maybe one day I'll have a better idea of set theory (possible) and feel like
looking at it again (improbable)...

[1] http://www.firstsql.com/dbdebunk

Received on Friday, 4 May 2001 08:57:19 UTC