<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>D2RQ Mapper</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Yasunori Yamamoto</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Toshiaki Katayama</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Database Center for Life Science, Univ. of Tokyo Kashiwa-no-ha Campus Station Satellite 6F.</institution>
          <addr-line>178-4-4 Wakashiba, Kashiwa-shi, Chiba</addr-line>
          ,
          <country country="JP">JAPAN</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>D2RQ Mapper (http://d2rq.dbcls.jp/) is a web application to edit a mapping file of D2RQ, a middleware to bridge Relational Database (RDB) and Resource Description Framework (RDF). A D2RQ mapping file defines how to map data stored in an RDB to RDF in the turtle format, and to write it by a text editor is cumbersome. D2RQ Mapper assists you to edit it by contextualizing input forms in the mapping language. In addition, D2RQ Mapper supports the R2RML format to output a mapping definition. We provide a Docker image of D2RQ Mapper, and so you can easily use it within your intranet.</p>
      </abstract>
      <kwd-group>
        <kwd />
        <kwd>D2RQ</kwd>
        <kwd>R2RML</kwd>
        <kwd>SPARQL</kwd>
        <kwd>SQL</kwd>
        <kwd>RDF</kwd>
        <kwd>RDB</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>subset of the specifications that the language provides by D2RQ Mapper currently,
based on our preliminary survey, we believe it helps to create a configuration file a
lot, and we continue to improve to support more specifications.</p>
      <p>With the D2RQ Mapper, user can easily
1. create a configuration file in D2RQ Mapping Language or R2RML,
2. query the RDB databases with SPARL on-the-fly via a D2RQ server, and,
3. dump a resulting RDF dataset.</p>
      <p>The advantage of using our tool is that you can easily edit and try a configuration
file within the tool without rebooting a D2RQ server. We focus on alleviating any
troubles to generate an ideal mapping file, and usually iteration of edit and try is
needed based on our mapping experience.</p>
      <p>D2RQ Mapper is available on this web site (http://d2rq.dbcls.jp/) for externally
accessible RDBs, and its Docker image
(https://hub.docker.com/r/d2rqmapper/d2rqmapper/) is available for locally accessible RDBs within an intranet.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Implementation</title>
      <p>As mentioned above, we provide D2RQ Mapper in two ways, that is, a globally
accessible web application and a Docker image. Once the latter is deployed, there is
no difference between them except for the sign-in methods. With the former, a user
can use D2RQ Mapper by Twitter or Facebook accounts in addition to one created at
the D2RQ Mapper site. On the other hand, a user can only use an account created at
the deployed D2RQ Mapper in the case of the latter. This is because to use D2RQ
Mapper within an intranet generally needs a basic user identification function only.
The way of deploying from the Docker image in a Docker terminal is as follows.
$ docker pull d2rqmapper/d2rq-mapper
$ docker run -d -p 80:80 d2rqmapper/d2rq-mapper
Then, you can use D2RQ Mapper from your browser by accessing to the IP
address shown when launching the Docker terminal.</p>
      <p>D2RQ Mapper runs on Ruby on Rails 4.2 with PostgreSQL 9.3. The version of
D2RQ tools used within D2RQ Mapper is 0.8.3dev obtained from the GitHub4. Data
concerning users, designated RDB Management Systems, and mapping to RDF
models are stored in the PostgreSQL. A D2RQ mapping file and an R2RML mapping
file are generated from the stored data with D2RQ Mapper, which does not use the
generate-mapping tool of the D2RQ package. An RDF dataset is generated using the
dump-rdf tool of the D2RQ package, and a given SPARQL query is processed using
the d2r-query, which is also included in the package.</p>
      <p>We designed D2RQ Mapper to minimize simple syntactic errors and improve
efficiency to edit a mapping file. This policy is reflected in the way of navigating the
users. After signing-in D2RQ Mapper, a user needs to configure an RDB setting along
with a name of the mapping to be generated first. When proceeding to the next step,
4 https://github.com/d2rq/d2rq
D2RQ Mapper verifies it and retrieves the schema of the given RDB such as the data
of its tables and their columns. Therefore, D2RQ Mapper can show the user the table
list at the following step, and the user can determine which tables to be included to
generate a target RDF dataset. In addition, a user can set up a join table that can be
seen as an ordinary table by defining how to join two or three tables. In the same way,
a user can configure how each column value is mapped to the target RDF dataset in
each table. On the configuration page, D2RQ Mapper shows the user sample row data
of the table to facilitate referring to the actual data in the RDB.</p>
      <p>Once configuring the RDB setting, a user can get the resultant mapping file at
anytime. In addition, the target RDF dataset is downloadable. We expect that D2RQ
Mapper accelerate the transition from RDB to RDF.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Future works</title>
      <p>The current version of D2RQ Mapper does not accept an ontology or a vocabulary.
To enable a user to edit a mapping file by referring to it within D2RQ Mapper, we are
adding a function of providing a graphical interface that shows an ontology map. In
addition, we will improve D2RQ Mapper to support more specifications of D2RQ
Mapping Language and R2RML.</p>
      <p>Acknowledgments. This work was supported by the National Bioscience Database
Center (NBDC) of the Japan Science and Technology Agency (JST).</p>
    </sec>
  </body>
  <back>
    <ref-list />
  </back>
</article>