Re: Direct Mapping

* Eric Prud'hommeaux <eric@w3.org> [2010-09-06 17:45-0400]
> * Juan Sequeda <juanfederico@gmail.com> [2010-09-06 15:36-0500]
> > On Mon, Sep 6, 2010 at 3:02 PM, Richard Cyganiak <richard@cyganiak.de>wrote:
> > 
> > > On 6 Sep 2010, at 20:33, Juan Sequeda wrote:
> > >
> > >> A RDB2RDF system with a R2RML file will always define a RDF graph.
> > >>
> > >> So what makes the direct mapping different?
> > >>
> > >> They way I see it, is that the R2RML file is generated automatically, and
> > >> with this file, given a RDB2RDF system, you will have a RDF graph. If
> > >> other
> > >> see it different (I can tell that Eric does), then please shout out.
> > >>
> > >
> > >
> > > The goal of the direct mapping is to have a simple, canonical RDF graph
> > > representation of every possible database (let's call it the “direct
> > > graph”).
> > >
> > > There are two ways how you could define the direct mapping:
> > >
> > > 1. As a mapping from a database to a direct graph
> > >
> > > 2. As a mapping from a database to an R2RML file that maps the database to
> > > the direct graph
> > >
> > > I would prefer the first option, because it better supports the
> > > specification of RDB2RDF mappings using generic RDF-to-RDF transformation
> > > technologies such as RIF, SPARQL CONSTRUCT, R2R, and so on. If the direct
> > > mapping is specified as the first option, then RDB2RDF mappings can be
> > > written using these technologies as a mapping from the direct graph to the
> > > desired target RDF schema/vocabulary.
> > >
> > 
> > Both options involve presenting the direct mapping rules for the mapping
> > from RDB to a direct RDF. Option 2 simply represents this mapping in R2RML.
> 
> Let's see if I understand the implied mechanics. Option 1 directly
> specifies the RDF graph implied by a database (for any tuple in the
> database, you can say exactly what triples are in the direct
> graph). Option 2 specifies a mapping language, with certain mapping
> semantics, and with a default configuration. The default graph is the
> products of applying the mapping semantics for a default configuration
> to a database.
> 
> 
> > So you think that a direct mapping shouldn't output the R2RML file? I think
> > it should because this file is the basis for people to work on and start
> > customizing it.
> 
> The RDF rules folks will have everything they need with option 1. They
> can write/share rules in RIF, SPIN, n3, ... which transform the
> default graph to popular ontologies. Simple implementations will
> materialize these graphs, and arguably cooler implementations will
> work directly on the relational data, but that's really implementation
> detail; all they need is the default graph.
> 
> 
> > > Hence I'm with Eric here.
> > >
> > >
> > >  The automatic mapping file that is generated in D2R is equivalent to the
> > >> Direct Mapping (right Richard?).
> > >>
> > >
> > > Well I'd say the *graph* produced by an auto-generated D2R mapping file is
> > > equivalent to the direct mapping.
> > >
> > 
> > and I'd call the auto-generated D2R mapping file the Direct Mapping file. So
> > D2R does option 2 then.

A direct mapping specification would define D2R's output graph given
only e.g.:

map:Database1 a d2rq:Database;
              d2rq:jdbcDSN "jdbc:mysql://localhost/DB";
              d2rq:jdbcDriver "com.mysql.jdbc.Driver";
              d2rq:username "XXX" ;
              d2rq:password "YYY" .

Likewise, a query interface built into a database (à la SPASQL), or
a tool which takes only commandline parameters should give the same
graph:

  dbview --mysql --user XXX --password YYY > mydb.rdf


> > >
> > > Best,
> > > Richard
> 
> -- 
> -ericP

-- 
-ericP

Received on Monday, 6 September 2010 21:55:54 UTC