<!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>Editing R2RML Mappings Made Easy.</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Kunal Sengupta</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Peter Haase</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Michael Schmidt</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Pascal Hitzler</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>R2RML by Example</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Wright State University</institution>
          ,
          <addr-line>Dayton OH 45435</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>uid Operations AG</institution>
          ,
          <addr-line>Walldorf</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The new W3C standard R2RML3 de nes a language for expressing mappings from relational databases to RDF, allowing applications built on top of the W3C Semantic Technology stack to seamlessly integrate relational data. A major obstacle in using R2RML, though, is the creation and maintenance of mappings. In this demo, we present a novel R2RML mapping editor which provides a user interface to create and edit mappings interactively even for non-experts.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>the {gid} column, and specify mo:recording as the type of these subjects.
The predicate rr:predicateObjectMap points to a structure de ning
propertyvalue pairs for the subjects de ned by the rr:subjectMap; in the example, for
every subject we create a property mo:duration, pointing to a literal created by
column length of the source database.</p>
      <p>Example 1.
rr:logicalTable
[rr:sqlQuery
"""SELECT id, gid, length FROM musicbrainz.recording</p>
      <p>WHERE musicbrainz.recording.length IS NOT NULL"""]
rr:subjectMap
[rr:class mo:recording ;
rr:template "http://musicbrainz.org/artist/{gid}\#\_"]
rr:predicateObjectMap
[rr:objectMap
[ rr:column "length" ;</p>
      <p>rr:datatype &lt;http://www.w3.org/2001/XMLSchema\#float&gt; ] ;
rr:predicate mo:duration].</p>
      <p>As can be seen from the example, the syntax to denote the mapping is rather
convoluted and requires deep technical knowledge of R2RML, its language
constructs, syntactic details (such as quotation), and the R2RML vocabulary itself.
3</p>
    </sec>
    <sec id="sec-2">
      <title>The Mapping Editor</title>
      <p>The editor that we have developed in order to overcome these technicalities
features an intuitive user interface which hides the R2RML vocabulary details from
the user, provides access to relational metadata of the relational database for
which the mappings are to be created, provides instant feedback where, at each
step, the user has the option to preview the triples that would result from the
mapping that is being created, and supports most of R2RML vocabulary except
rr:graph, which we plan to include as we continuously evolve the editor. In the
following we brie y describe the various steps of the editor's wizard work ow.
Step 1 Datasource, Base URI Selection. The rst step in the wizard lets the
user choose the datasource for which mappings shall be de ned, i.e. by
design the editor supports the maintenance of mappings over multiple
relational data sources. As part of the datasource selection, the user may
also choose a base URI for URI construction templates speci ed in the
upcoming steps.</p>
      <p>Step 2 R2RML Rule Selection. After datasource selection, the editor loads
and displays previously saved mappings for the datasource. At this point
the user may choose to edit an existing rule or add a new one. The editor
also provides a lter using which the mappings could be looked up based
on involved table names, concept names and property names.</p>
      <p>Step 3 Logical Table Selection. In this step, the editor provides various
options to choose a logical table. The logical table could be a database
table, view or a custom SQL query written by the user. If the option to
add a database table is selected, all the tables from the database schema
are displayed. Options to preview the table's data and metadata are also
available. On the other hand, if the option of SQL query is chosen then
an SQL editor is shown where the user can type SQL queries and preview
the results.</p>
      <p>Step 4 Subject Map Creation. Once a logical table has been selected, the
editor guides the user to a subject template creation step. By the click
of a button, the user can carry over columns that should be used to
generate the template. Additionally, classes (i.e., types) can be added to
the subject by using the auto-complete eld rdf:type, which displays all
the classes that are present in the system. The editor is exible enough
such that multiple classes can be added. At this stage a preview of the
generated triples can be accessed as well. This provides feedback to the
user such that they can adjust the values in order to obtain the intended
results.</p>
      <p>Step 5 Predicate-Object Maps Creation. After the subject map creation,
predicate-object maps can be added to the mapping. Again, the editor
provides exibility for adding as many predicate-object pairs as needed.
Additionally, for object maps all types of terms de ned in R2RML are
supported, namely constant terms, column values, templates, and
object references. The object reference option lets the user choose from the
previously de ned mappings. Furthermore, on choosing the appropriate
rule the child and parent columns are prepopulated from the
corresponding logical tables. Again, multiple join conditions can be added through
the interface. The preview triples option is also available at this stage,
again providing the user with valuable feedback. Fig. 1 depicts the screen
corresponding to this step.</p>
      <p>Step 6 Textual Representation. Finally, an intuitive textual representation
of the mapping rule is displayed. At this point the user could go back to
any previous step to modify the mapping or otherwise save the mapping.</p>
      <p>The demo video: https://www.youtube.com/watch?v=PfP2wmWw9-o is
available online, the video includes a very brief introduction to R2RML and
motivation for an editor to create R2RML mappings. The remainder of the
demonstration shows a use case of mapping MusicBrainz5 database tables to the Music
ontology.6 In particular, we demonstrate two example mappings, where each step
of the mapping creation process is explained and special features of the editor
are highlighted.</p>
      <p>
        Although tools like Karma [2], Ontop [3], Topbraid Composer7, and Neon
Toolkit8 can be used for mapping relational and other datasources to RDF,
the editor presented here provides the following advantages (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) It is the rst
editor to fully support R2RML mappings, (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) The preview feature is unique
as the users get instant feedback and can modify the mappings iteratively, (
        <xref ref-type="bibr" rid="ref3">3</xref>
        )
5 MusicBrainz: https://wiki.musicbrainz.org/Next Generation Schema
6 Music ontology: http://musicontology.com
7 See http://www.topquadrant.com/products/TB_Composer.html
8 See http://neon-toolkit.org/wiki/Main_Page
It provides easy management of R2RML mappings, (
        <xref ref-type="bibr" rid="ref4">4</xref>
        ) It provides a search
utility, where users can nd mappings based on table names, concept names and
property names. Apart from these advantages, we are going to further improve
the editor by adding features like automatic mapping suggestions and on click
default mapping [4] generation.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Hartig</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Harth</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sequeda</surname>
            ,
            <given-names>J</given-names>
          </string-name>
          . (eds.):
          <source>Proceedings of the Second International Workshop on Consuming Linked Data (COLD2011)</source>
          , Bonn, Germany, October
          <volume>23</volume>
          ,
          <year>2011</year>
          , CEUR Workshop Proceedings, vol.
          <volume>782</volume>
          .
          <string-name>
            <surname>CEUR-WS.org</surname>
          </string-name>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Knoblock</surname>
            ,
            <given-names>C.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Szekely</surname>
            ,
            <given-names>P.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ambite</surname>
            ,
            <given-names>J.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Goel</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gupta</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lerman</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Muslea</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Taheriyan</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mallick</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Semi-automatically mapping structured sources into the semantic web</article-title>
          . In: Simperl,
          <string-name>
            <given-names>E.</given-names>
            ,
            <surname>Cimiano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            ,
            <surname>Polleres</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Corcho</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            ,
            <surname>Presutti</surname>
          </string-name>
          , V. (eds.)
          <source>The Semantic Web: Research and Applications - 9th Extended Semantic Web Conference, ESWC</source>
          <year>2012</year>
          , Heraklion, Crete, Greece, May
          <volume>27</volume>
          -31,
          <year>2012</year>
          .
          <source>Proceedings. Lecture Notes in Computer Science</source>
          , vol.
          <volume>7295</volume>
          , pp.
          <volume>375</volume>
          {
          <fpage>390</fpage>
          . Springer (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Rodriguez-Muro</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calvanese</surname>
          </string-name>
          , D.: -ontop- framework (
          <year>2012</year>
          ), http://obda.inf. unibz.it/protege-plugin/
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Sequeda</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Arenas</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Miranker</surname>
            ,
            <given-names>D.P.</given-names>
          </string-name>
          :
          <article-title>On directly mapping relational databases to RDF and OWL</article-title>
          . In: Mille,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Gandon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.L.</given-names>
            ,
            <surname>Misselis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Rabinovich</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Staab</surname>
          </string-name>
          , S. (eds.)
          <source>Proceedings of the 21st World Wide Web Conference</source>
          <year>2012</year>
          ,
          <article-title>WWW 2012</article-title>
          , Lyon, France,
          <source>April 16-20</source>
          ,
          <year>2012</year>
          . pp.
          <volume>649</volume>
          {
          <fpage>658</fpage>
          .
          <string-name>
            <surname>ACM</surname>
          </string-name>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>