<!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>Pleasantly Consuming Linked Data with RDF Data Descriptions</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Michael Schmidt</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Georg Lausen</string-name>
          <email>lausen@informatik.uni-freiburg.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Freiburg, Institute for Computer Science Georges-Kohler-Allee</institution>
          ,
          <addr-line>79110 Freiburg</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>uid Operations AG Altrottstra e 31</institution>
          ,
          <addr-line>69190 Walldorf</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Although the intention of RDF is to provide an open, minimally constraining way for representing information, there exists an increasing number of applications for which guarantees on the structure and values of an RDF data set become desirable if not essential. What is missing in this respect are mechanisms to tie RDF data to quality guarantees akin to schemata of relational databases, or DTDs in XML, in particular when translating legacy data coming with a rich set of integrity constraints { like keys or cardinality restrictions { into RDF. Addressing this shortcoming, we present the RDF Data Description language (RDD), which makes it possible to specify instance-level data constraints over RDF. Making such constraints explicit does not only help in asserting and maintaining data quality, but also opens up new optimization opportunities for query engines and, most importantly, makes query formulation a lot easier for users and system developers. We present design goals, syntax, and a formal, First-order logics based semantics of RDDs and discuss the impact on consuming Linked Data.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Since the early days of relational databases, constraints have been
considered essential to specify the intended states of the data sets representing
the information of certain applications [
        <xref ref-type="bibr" rid="ref1 ref2">1, 2</xref>
        ]. In recent years the
number of applications that are based on large scale distributed data
available on the Internet has been constantly increasing. Many of them are
based on RDF [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and the question arises, whether relational database
like constraints can be considered essential for such applications, as well.
RDF data often comes together with RDFS [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] or even OWL [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], and it
is well-known that these languages are not intended to cover relational
constraints [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Further, designed as rule languages, they do not o er
mechanisms to express constraints explicitly over the instance data [6{8].
      </p>
      <p>
        As an example, consider the work on mapping relational databases
to RDF from the W3C's Direct Mapping and R2RML initiatives [
        <xref ref-type="bibr" rid="ref10 ref9">9, 10</xref>
        ].
While they may exploit relational integrity constraints to increase the
mapping quality, these constraints are at most implicit in the resulting
RDF database: for a data consumer, who may not be aware of the
underlying mappings, no explicit guarantees about properties and structure of
the data are available. For instance, in the Direct Mapping approach [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]
primary keys are exploited to generate unique IRIs for objects using the
key column names and values; yet, there is no constraint in RDF
describing that the properties derived from the key columns are single-valued
and identify the resulting objects. In fact, designed as rule languages
neither RDF(S) nor OWL allow to express constraints [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Although their
built-in semantics may imply certain constraints (such as type inheritance
at instance-level for rdfs:subClass relationships), constraints are only
implicit and, moreover, may not hold when the data is published under
ground semantics { a common scenario in the Linked Data context.
      </p>
      <p>
        Contributions. After motivating the need to enable end users in
writing precise SPARQL queries in Section 2, we present the RDF Data
Description language, RDD, to de ne constraints over RDF, akin to
DTDs for XML. We then discuss design decisions and related work in
Section 3, identifying the need for RDDs to be both user-readable and
machine-processable. Next, we elaborate on the con ict between the Open
World Assumption underlying RDF(S) and the requirements of a hard
constraint language, concluding that RDDs shall support a pay-as-you-go
paradigm in constraining RDF(S). Section 4 formalizes RDDs by means of
a user-friendly syntax that captures a broad range of constraints
including keys, cardinalities, subclass, and subproperty restrictions. Section 5
presents a First-order Logics semantics, making it easy to implement
RDD checkers and clearing the way for optimizations. Finally, in
Section 6 we discuss directions of future research, including the
implementation, coverage, extensibility, and relationship to standards like VoID [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>RDD by Example</title>
      <p>As a motivating example, assume a developer wants to write a SPARQL
query that extracts information about persons in an RDF document,
described by properties rdfs:label (denoting the name), foaf:age, and
foaf:mbox (mail address) { where every person shall be represented by
exactly one row of the result table.3 While this sounds like a fairly trivial
3 In fact, the problem is a slightly modi ed example one of the authors recently
encountered in the context of an industrial project.
task (in SQL, with a reasonable schema, this could probably be expressed
by a simple query like SELECT id, name, age, email FROM Person),
with the unconstrained RDF model this may become quite tricky, even
if the schema (i.e., FOAF and RDF(S) vocabulary) is well known to the
developer: without further knowledge about the instance data, the
developer cannot be sure which predicates are present at all, and which of them
may be multi-valued. Making guesses that rdfs:label and foaf:age are
single-valued, the developer may nally come up with the following query:
SELECT ?person ?name ?age (GROUP_CONCAT(?mail; separator=", ") AS ?mail)
WHERE { ?person rdf:type foaf:Person .</p>
      <p>OPTIONAL { ?person rdfs:label ?name }
OPTIONAL { ?person foaf:age ?age }</p>
      <p>OPTIONAL { ?person foaf:mbox ?mail } } GROUP BY ?name ?age</p>
      <p>The OPTIONAL clauses ensure that persons with incomplete
information are included in the result; to group persons with multiple email
addresses, the developer used GROUP BY combined with GROUP_CONCAT in
the SELECT clause, thus concatenating all email addresses of a single
person. The crucial point here is that even this simple task leads to a quite
complex query covering the \worst case scenario" anticipated by the
developer, requiring the use of advanced SPARQL 1.1 constructs (which, as
a matter of fact, are hard to optimize by query engines). And even this
carefully designed query leads to multiple result rows for the same person
in the presence of multiple labels (e.g., with di erent language tags).</p>
      <p>What is needed to ease SPARQL query development is a data
description that describes the structural constraints of the instance data beyond
the schema information contained in the underlying RDF(S) speci cation
and ontologies, which the developer can consult when writing queries. The
RDD language advocated in this paper was designed with exactly this goal
in mind. RDD would allow the data publisher to express the instance data
constraints by means of a well-de ned, human readable language.</p>
      <p>Figure 1 depicts an example RDD that, when tied to a speci c RDF
database, helps the developer in understanding the constraints that hold
on instance level. With respect to the concept foaf:Person, the rst part
of the RDD in Figure 1 (left) speci es a set of constraints that are known
to hold for every instance of the class. Summarizing the relevant part of
the RDD, it tells the developer that the property rdfs:label serves as a key
for persons, every person has exactly one foaf:email property (keyword
TOTAL), and every person has at most one foaf:age (keyword FUNCTIONAL).
Further, all theses three properties point to literals, the latter being of
type xsd:integer { this may be useful information when writing e.g.
aggregation queries over the age, or when post-formatting the results.
PREFIX ex: &lt;http://www.example.com#&gt;
...</p>
      <p>CWA CLASSES {
OWA CLASS foaf:Person SUBCLASS ex:Student {</p>
      <p>KEY rdfs:label : LITERAL
TOTAL foaf:email : LITERAL
FUNCTIONAL foaf:age : LITERAL(xsd:integer)
RANGE(foaf:Person) foaf:knows : IRI }
}
OWA CLASS ex:Student {</p>
      <p>TOTAL ex:matricNr : LITERAL(xsd:integer)
MIN(1), RANGE(ex:Course) ex:course : RESOURCE
PATH(ex:course/ex:givenBy), RANGE(foaf:Person)</p>
      <p>ex:taughtBy : IRI }
OWA PROPERTIES {</p>
      <p>TOTAL rdfs:label
foaf:knows SUBPROPERTY ex:taughtBy }</p>
      <p>With the RDD speci cation at hand { which can be understood in
few seconds { the developer can considerably simplify the query:
SELECT ?person ?name ?age ?mail .</p>
      <p>WHERE { ?person rdf:type foaf:Person ; rdfs:label ?name ; foaf:mbox ?mail .</p>
      <p>OPTIONAL { ?person foaf:age ?age } }</p>
      <p>Even if the developer is not aware of the RDD and comes up with a
query that uses, e.g., redundant OPTIONAL blocks, the RDD may still
be used by the optimizer to simplify the query and speed up evaluation.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Design Decisions and Related</title>
    </sec>
    <sec id="sec-4">
      <title>Work</title>
      <p>Philosophy. RDDs specify constraints that hold in an RDF data set.
However, not to loose RDF's minimally constraining way for representing
information { where one may interlink and extend data sets by adding new
information { they shall not require the structure of RDF to be de ned
completely, but give a pragmatic answer to these two con icting design
goals in that they adhere to RDF's Open World character following a
pay-as-you-go paradigm, which allows users to impose constraints only on
a subset of classes, or to constrain classes and properties only partially.</p>
      <p>Designed for Humans. To make it easy for humans to understand,
write, and use RDDs as a guide when writing queries, RDDs shall come
with a user-understandable syntax. To this end, we use an object-oriented
approach closely aligned to the RDF(S) data model, reusing concepts
like classes, properties, and subclass/subproperty relationships. An RDF
serialization of RDDs is out of the scope of this paper (cf. Section 6).</p>
      <p>
        Scope. The importance of constraints for RDF(S) has recently been
emphasized in the context of REST-based enterprise applications [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ].
With the goal to provide a machine-readable language, OSLC Resource
Shape de nes an RDF vocabulary to encode quali ed property constraints
(such as cardinality, range, or value restrictions). While no formal
semantics is given, the authors propose an implementation via SPARQL ASK
queries. RDDs, in contrast, are designed for humans, come with a formal
semantics, and go far beyond what can be expressed with OSLC (e.g.,
expressing completeness guarantees and unquali ed property constraints).
      </p>
      <p>
        Enabling the targeted restriction of RDF(S) constructs, RDDs
provide built-in constructs to express constraints over classes, subclasses, and
properties such as domain, range, or cardinality restrictions. In the light
of the Direct Mapping and R2RML standards [
        <xref ref-type="bibr" rid="ref10 ref9">9, 10</xref>
        ], RDDs shall also
cover constraints from the relational databases domain, in order to carry
over integrity information when translating relational data.
      </p>
      <p>
        RDF data is often equipped with RDFS or OWL axioms and may
be interpreted in di erent entailment regimes. Dedicated studies of
constraints in the context of OWL have been presented in [
        <xref ref-type="bibr" rid="ref13 ref6">6, 13</xref>
        ]. Adhering to
the di erent semantics under which RDF can be published, RDDs should
be independent from the entailment regime. Our approach is similar to
SPARQL [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], which also supports di erent entailment regimes (and is
de ned independently): if, e.g., RDF is published under ground
semantics, an associated RDD spec would specify the constraints that hold on
the bare instance data; if, e.g., RDFS inferencing is turned on, an RDD
speci cation would take inferred facts into account { in both cases, an end
user can transparently rely on the RDD spec when accessing the data.
      </p>
      <p>
        Formal Semantics. While a SPARQL-based semantics may seem
like a natural choice (cf. [
        <xref ref-type="bibr" rid="ref12 ref8">12, 8</xref>
        ]), we argue that is desirable to choose a
semantics that can easily be mapped to existing work on integrity
constraints from the relational database community, e.g. to carry over
Semantic Query Optimization techniques (e.g., the seminal work [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]). We
therefore decided for a First-order Logics (FOL) based semantics,
representing constraints as First-order sentences known as tuple-generating and
equality-generating dependencies [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ], which are well understood from
previous investigations (e.g. [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]). A possible implementation of our FOL
based semantics by means of SPARQL will be discussed later in Section 6.
      </p>
    </sec>
    <sec id="sec-5">
      <title>4 RDD Syntax and Model</title>
      <p>Figure 1 provides an example RDD. The de nition for class foaf:Person
contains the constraints for predicates rdfs:label, foaf:email, and foaf:age
discussed in Sec. 2, plus a constraint expressing that predicate foaf:knows,
when used for an instances of type foaf:Person, points to instances of type
foaf:Person, which are always IRIs (i.e., not blank nodes). In the spirit
of RDF, this does not enforce referred objects to be exclusively typed as
foaf:Person, but only that one edge typing the object as foaf:Person is
present. The OWA keyword (short for Open World Assumption) in front
of the CLASS de nition allows persons to have further properties not
listed in the class speci cation; its counterpart, keyword CWA, would
enforce that the class is closed in the sense that class instances are
completely described by the properties occurring in the CLASS section.
Further, foaf:Person has a subclass ex:Student (keyword SUBCLASS). With
RDDs focusing on instance-level constraints, this does not enforce a
triple (ex:Student, rdfs:subClassOf, foaf:Person) in the data, but
guarantees that every ex:Student satis es the same constraints as foaf:Persons.</p>
      <p>Similar in spirit, the CLASS de nition for ex:Student guarantees that
(i) ex:matricNr is a TOTAL property, i.e. every student has exactly one
matriculation number, (ii) ex:course occurs at least once and has RANGE
ex:Course, and (iii) the PATH and RANGE constraints de ned for property
ex:taughtBy asserts that, for every ex:Student, there is a property path
along the edges ex:course followed by ex:givenBy pointing to the same
value of type foaf:Person as property ex:taughtBy. Path constraints are
special kinds of inclusion constraint, similar in spirit to foreign keys.</p>
      <p>The surrounding CLASSES section is de ned as CWA, guaranteeing
completeness in the sense that the data contains only instances of the two
classes foaf:Person and ex:Student. Subsequently, the RDD contains a
PROPERTIES section constraining properties in an unquali ed, global way.
The rst entry, TOTAL rdfs:label, ensures that every Resource has
exactly one label { a useful information for query authors. The SUBPROPERTY
spec, targeting the instance level again, ensures that, for every triple
(X,ex:taughtBy,Y) in the data, there is an implied triple (X,foaf:knows,Y).
Finally, the OWA keyword of the PROPERTIES section expresses that there
may be other properties than those listed in the section.</p>
      <p>
        Rather than presenting the concrete syntax (see the Technical
Report [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] for this level of detail), Figure 2 visualizes the structure and
concepts of the RDD language in a UML-style notation. Boxes denote
concepts, arrowed lines sub-concept relationships, and the second line
type indicates that concept A uses B. At top-level, RDDs consist of
a ClassConstraintSec and a PropConstraintSec, which contain
lists of ClassConstraints and PropConstraints, respectively, plus
a boolean ag indicating whether the sections should be interpreted under
Open or Closed World Assumption (i.e., whether the classes and
properties in the sections describe the RDF data completely or nor) { the OWA
keyword enables RDDs to be written in a pay-as-you-go fashion, where
known constraints are speci ed, while unknown parts are left unspeci ed.
      </p>
      <p>Central to the RDD concept is the notion of PropConstraints, an
abstract concept that is further subclassed into speci c subclasses:</p>
      <p>RDD
ccs : ClassConstraintSec
pcs : PropConstraintSec</p>
      <p>ClassConstraintSec
ccs : List&lt;ClassConstraint&gt;
isOWA : Boolean</p>
      <p>ClassConstraint
class : IRI
subClasses : List&lt;IRI&gt;
isSingleton : Boolean
isOWA : Boolean
keys : List&lt;Key&gt;
qpcs : List&lt;PropertyConstraint&gt;</p>
      <p>Key
keyProps : List&lt;IRI&gt;</p>
      <p>PropConstraintSec
upcs : List&lt;PropConstraint&gt;
isOWA : Boolean</p>
      <p>PropConstraint (abstract)
prop : IRI
TotalityConstraint</p>
      <p>FunctionalityConstraint</p>
      <p>RangeTypeConstraint
rangeType: RangeType</p>
      <p>MinConstraint
nr : Integer</p>
      <p>MaxConstraint
nr : Integer</p>
      <p>DomainConstraint
domain : IRI</p>
      <p>RangeConstraint
range : IRI</p>
      <p>PathConstraint
path : List&lt;IRI&gt;</p>
      <p>SubPropertyConstraint
subProps : List&lt;IRI&gt;
{ A RangeTypeConstraint indicates that the property prop points
to either a URI, BlankNode, Resource, or a (possibly typed) Literal.
{ A Min/MaxConstraint indicates that the property prop occurs at
least or at most nr times, respectively.
{ A Domain/RangeConstraint indicates a guaranteed domain or
range for subject and objects associated with prop, respectively.
{ A PathConstraint indicates that the value of prop can as well be
reached by following a given path of properties.
{ A SubPropertyConstraint indicates that for every triple using
property subProp, there is also an identical triple using property prop.
{ Functionality/TotalityConstraints express that prop occurs
at most or exactly one time, respectively.</p>
      <p>PropConstraints are used in two di erent contexts: (1) The
PropConstraintSec (cf. keyword PROPERTIES) contains a list upcs of
PropConstraints, implementing unquali ed, global characteristics of
properties. For instance, the TotalityConstraint in Fig. 1 (keyword TOTAL)
for prop :=rdfs:label asserts that every resource has exactly one label.
(2) Variable qpcs inside ClassConstraints represents quali ed,
classspeci c PropConstraints, e.g. the MinConstraint (keyword MIN) for
prop :=ex:course and nr := 1 in Fig. 1 in the class section of ex:Student
ensures that every instance of ex:Student visits at least one course.</p>
      <p>In addition to qpcs, a ClassConstraint contains (i) a list of
subclasses (keyword SUBCLASS), enforcing that instances of the subclasses
inherit inner constraints of the superclass, (ii) a boolean ag isSingleton,
enforcing that exactly one instance of the class exists, (iii) the isOWA ag,
and (iv) a list of keys. We sketch their semantics in the next section.</p>
    </sec>
    <sec id="sec-6">
      <title>RDD Semantics</title>
      <p>The semantics, denoted by JrKE , decomposes an RDD r into constraints
that can be checked individually and independently. It uses an
environment E capturing SUBCLASS and SUBPROPERTY relations speci ed in the
RDD. The result is a set of in First-order Logics (FOL) constraints over
relation TD(s; p; o) representing the RDF triples in RDF document D.
With J.KE at hand, we de ne the notion of consistency as follows.
De nition 1. Let D be an RDF document and r be an RDD speci
cation. Further let cs := JrKE be the set of rst-order logic constraints
de ned by r. Document D is consistent w.r.t. r if and only if for all
constraints c 2 cs it holds that c is valid in TD, i.e. TD j= c.</p>
      <p>
        The evaluation function J.KE is de ned by about 40 rules along the
structure of RDDs. At top-level, an RDD is decomposed into its
ClassConstraintSec and PropConstraintSec (i.e., the members of class
RDD, cf. Fig. 2), which are then further decomposed by dedicated rules.
At the core are inference rules mapping the individual constraints { e.g.,
the PropConstraint subclasses { into FOL. We sketch the idea of the
evaluation and refer to the TR [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] for a complete listing of the rules.
      </p>
      <p>Let us exemplarily discuss the inference rule for ClassConstraints,
which derives constraints for its key and property constraints, as well
as its global \con guration", namely, the subclass hierarchy, whether it
is de ned as singleton, and whether it is de ned under Open or Closed
World Assumption. According to Figure 2, the ClassConstraint is
represented by a structure (class,subClasses,isSingleton,keys,qpcs,isOWA).
cssc :=</p>
      <p>cssingleton :=J(class, isSingleton) : SingletonKE
[ J(csc,false,E:C(csc),keys,cpcs,true) : ClassConstraintKE
csc2subClascsseskey := [</p>
      <sec id="sec-6-1">
        <title>J(class,key) : ClassKeyKE</title>
        <p>csqpcs :=
[
key2keys</p>
        <p>J(class,cpc) : ClassPropConstraintKE
cpc2cpcs
cswa :=J(class, E:A(class), isOWA) : OWAP KE
J(class : IRI, subClasses : ListhIRI i, isSingleton : Boolean, keys : ListhKeyi,
qpcs : ListhPropConstrainti, isOWA : Boolean) : ClassConstraintK `</p>
        <p>cssingleton [ cssc [ cskey [ csqpcs [ cswa</p>
        <p>Starting with the conclusion, the result of evaluating the
ClassConstraint is the union of the constraint sets cssingleton, cssc, : : : ; the
premise of the rule describes how these constraint sets are calculated. The
constraint set cssingleton, for instance, is obtained by evaluating a
substructure Singleton with class IRI and the isSingleton ag as argument
{ if isSingleton=true, this substructure generates a constraint enforcing
that the class has exactly one instance. The scheme for computing cswa,
cskey and the quali ed PropConstraints csqpcs are analogous. Most
interesting is the computation of cssc, which captures the inheritance of
constraints to subclasses. It is obtained by evaluating a replicated version
of the class constraint for every subclass csc. In these replicas, we pass
the keys and cpcs constraints, and consult environment E to obtain the
subclasses of the csc. Note that we neither inherit the singleton constraint
(passing isSingleton:=false) nor impose a CWA constraint on the subclass
(passing isOWA=true); this gives the RDD designer greater exibility.</p>
        <p>To conclude, let us sketch the evaluation of a quali ed
RangeConstraint as one of the constraint-generating rules. The rule below
implements such a constraint for property p with range R for class C: the
resulting formula enforces that for every instance s of class C, every value
o referenced by p is of type R. Note the di erence toward RDFS: while
predicate rdfs:range is similar by idea, it does not enforce the presence of
such a triple, but sets up a rule that generates/completes the data { the
constraint guarantees the presence of such a triple in the database.</p>
      </sec>
      <sec id="sec-6-2">
        <title>J(C : IRI, (p : IRI, R : IRI) : RangeConstraint)KE `</title>
        <p>f8s; o(TD(s; rdf:type; C) ^ TD(s; p; o) ! TD(o; rdf:type; R))g
6</p>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>Discussion and Future Research Direction</title>
      <p>
        RDDs constitute a powerful mechanism to describe instance-level
constraints and help both humans { when writing SPARQL queries { and
engines { which may exploit RDDs with its concise semantics to assert
data consistency and optimize queries (cf. [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]). Our approach opens up a
new research eld, which we will shortly discuss in the following.
      </p>
      <p>
        Implementation. Given the First-order semantics, it is
straightforward to build a constraint checker using existing FOL engines. In the
context of SPARQL engines, though, it may be favorable to implement
checkers by means of SPARQL Ask queries. The close connection
between SPARQL and logics-based formalisms has been pointed out in
several works [
        <xref ref-type="bibr" rid="ref18 ref19">18, 19</xref>
        ]. In [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] it was shown how to encode constraints such
as keys and cardinalities in SPARQL. Further, it was proven in [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] by
a constructive proof that every First-order sentence can be expressed
in SPARQL. These results make it easy to map the FOL semantics to
SPARQL. The e cient implementation of constraint checking, though,
is a challenging task left for future work. A simple approach based on a
one-by-one execution of Ask queries may have limitations, in particular
when it comes to scenarios with frequent data updates. Here, incremental
constraint checking approaches would be required. However, given that
integrity constraints are an integral part of other data models (such as
relational data and DTDs for XML) and that the logical structure of RDD
constraints { EGDs and TGDs, which are well understood in theory { is
very similar, we are convinced that e cient implementations are possible.
      </p>
      <p>
        Deriving RDDs. An interesting topic is the derivation of RDDs
from instance data or { when the data has been obtained from relational
systems [
        <xref ref-type="bibr" rid="ref10 ref9">9, 10</xref>
        ] { from constraints in the original data sources. RDFS or
OWL speci cations, for instance, that are included in the data, or query
logs may give valuable hints about candidate constraints that hold in the
instance data, allowing to automatically build RDDs that could be re ned
manually. In this line, it would also be interesting to study interrelations
between di erent entailment regimes and their implications for RDDs.
      </p>
      <p>
        Coverage and Extensibility. Since the early years of database
research, various classes of constraints have been investigated (see e.g. [
        <xref ref-type="bibr" rid="ref15 ref20">20,
15</xref>
        ]). Based on the design goals from Section 3, we selected a reasonable
set of constraints that (i) may be encountered in typical RDF(S)
scenarios and (ii) may be of bene t when writing SPARQL queries. There are,
of course, constraint types that are currently not supported by RDDs.
One extension would be user-de ned constraints in the form of
arbitrary SPARQL Ask queries { they could be easily added through a new
USER in RDDs, containing a list of queries including the expected results.
While such custom constraints may be hard to understand by users, they
could help to model complex data consistency scenarios. Other types of
constraints that are candidates for extension include functional
dependencies [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ], EGDs and TGDs with disjunction [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ],4 or value restriction
(e.g. expressing that property foaf:gender maps to either male or female).
      </p>
      <p>
        As a side note, we want to point out that we intentionally did not
include foreign keys as proposed in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Although they play an important
role in relational modeling, they are an arti cial construct arising due to
the relational structure: when mapping relational database into RDF(S),
foreign keys typically result in range speci cations over object properties
(cf. [
        <xref ref-type="bibr" rid="ref23 ref9">23, 9</xref>
        ]), which RDDs can easily capture using RangeConstraints.
4 In RDDs, some constraints like the CWA restriction implicitly contain disjunction.
      </p>
      <p>We may want to express disjunction in other contexts, e.g. over range restrictions.</p>
      <p>Other applications. RDDs can be exploited for use cases beyond
query formulation, semantic query optimization, and quality assurance.
For instance, the constraints encoded in RDDs may give valuable input
for schema mapping and alignment. As another example, RDDs could be
used to derive precise data input forms, and thus help in producing data.</p>
      <p>RDD and Linked Open Data. Constraint checking, at rst glance,
may look like a local task. However, as RDF resources being identi ed
by IRIs are globally unique, local checking of constraints for certain
constraints classes may not be su cient. Assume an inclusion dependency,
say a range constraint r, is violated in data set R1, however the violating
resource exists and is typed accordingly in a data set R2. According to the
principles of Linked Open Data, r should not be declared to be violated.</p>
      <p>We conclude that constraint checking in an LOD environment in
general requires us to consider the constraints of all involved data sets. Even
though this does not make constraint checking inapplicable, it may
require novel ways and paradigms to specify and check constraints in the
context of an open world, with possibly incomplete knowledge. We leave
a closer investigation of these issues for future work.</p>
      <p>
        Publishing of RDDs. As a bridge between the publishers and users
of RDF data, W3C proposes the VoID vocabulary (Vocabulary of
Interlinked Datasets) [
        <xref ref-type="bibr" rid="ref11 ref24">11, 24</xref>
        ]. We suggest to develop a canonical RDF
representation for RDDs (coexisting with the user-friendly syntax presented in
the paper), with tooling to convert between the two syntaxes. This would
make it quite easy to, e.g., publish RDD descriptions as part of VoID. A
detailed study of the relationships toward VoID and an RDF serialization
for the RDD language are interesting topics for future work.
      </p>
      <p>Standardization. The next steps we plan are the implementation of
the RDD language by means of a SPARQL query generator that outputs
the Ask queries for checking RDDs, which would make RDDs
immediately usable by any SPARQL engine. Further, we are investigating di
erent ways to standardize the proposed language, e.g. as part of the W3C
standardization activities in the semantic technology space.
Acknowledgments. This work was supported by the German Federal
Ministry of Economics and Technology as part of the project
\Durchblick ", grant KF2587503BZ2, and by Deutsche Forschungsgesellschaft as
part of the project \CORSOS ", grant LA 598/7-1.</p>
      <p>The authors want to thank Peter Haase and Michael Meier for fruitful
discussions and the anonymous reviewers for their constructive feedback.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>E. F.</given-names>
            <surname>Codd</surname>
          </string-name>
          , \
          <article-title>A Relational Model of Data for Large Shared Data Banks,"</article-title>
          <source>Commun. ACM</source>
          , vol.
          <volume>13</volume>
          , no.
          <issue>6</issue>
          , pp.
          <volume>377</volume>
          {
          <issue>387</issue>
          ,
          <year>1970</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>M.</given-names>
            <surname>Stonebraker</surname>
          </string-name>
          , \
          <article-title>Implementation of Integrity Constraints and Views by Query Modi cation,"</article-title>
          <source>in SIGMOD Conference</source>
          ,
          <year>1975</year>
          , pp.
          <volume>65</volume>
          {
          <fpage>78</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3. \
          <article-title>RDF Speci cation Overview (W3C),"</article-title>
          http://www.w3.org/standards/techs/.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4. \OWL 2
          <string-name>
            <given-names>Web</given-names>
            <surname>Ontology Language Document Overview (Second Edition)</surname>
          </string-name>
          ," http://www.w3.org/TR/owl2-overview/.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>B.</given-names>
            <surname>Motik</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Horrocks</surname>
          </string-name>
          , and U. Sattler, \
          <article-title>Adding Integrity Constraints to OWL,"</article-title>
          <source>in OWLED</source>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>B.</given-names>
            <surname>Motik</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Horrocks</surname>
          </string-name>
          , and U. Sattler, \
          <article-title>Bridging the Gap Between OWL</article-title>
          and
          <string-name>
            <surname>Relational Databases</surname>
          </string-name>
          ,
          <article-title>"</article-title>
          <string-name>
            <given-names>J. Web</given-names>
            <surname>Sem</surname>
          </string-name>
          ., vol.
          <volume>7</volume>
          , no.
          <issue>2</issue>
          , pp.
          <volume>74</volume>
          {
          <issue>89</issue>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>J.</given-names>
            <surname>Sequeda</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Arenas</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D. P.</given-names>
            <surname>Miranker</surname>
          </string-name>
          , \
          <article-title>On Directly Mapping Relational Databases to RDF and OWL,"</article-title>
          <source>in WWW</source>
          ,
          <year>2012</year>
          , pp.
          <volume>649</volume>
          {
          <fpage>658</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>G.</given-names>
            <surname>Lausen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Meier</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Schmidt</surname>
          </string-name>
          , \
          <article-title>SPARQLing Constraints for RDF,"</article-title>
          <source>in EDBT</source>
          ,
          <year>2008</year>
          , pp.
          <volume>499</volume>
          {
          <fpage>509</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <article-title>\A Direct Mapping of Relational Data to RDF,"</article-title>
          http://www.w3.org/TR/rdbdirect-mapping/.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10. \
          <article-title>R2RML: RDB to RDF Mapping Language,"</article-title>
          http://www.w3.org/TR/r2rml/.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>K.</given-names>
            <surname>Alexander</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Cyganiak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Hausenblas</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J</given-names>
            .
            <surname>Zhao</surname>
          </string-name>
          , \
          <article-title>Describing Linked Datasets - on the Design and Usage of VoID,"</article-title>
          <source>in LDOW</source>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>A.</given-names>
            <surname>Ryman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. L.</given-names>
            <surname>Hors</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Speicher</surname>
          </string-name>
          , \
          <article-title>OSLC Resource Shape: A Language for De ning Constraints on Linked Data,"</article-title>
          <source>in LDOW</source>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13. J. Tao, \
          <article-title>Adding integrity constraints to the semantic web for instance data evaluation,"</article-title>
          <source>in International Semantic Web Conference (2)</source>
          ,
          <year>2010</year>
          , pp.
          <volume>330</volume>
          {
          <fpage>337</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <article-title>\SPARQL 1.1 Entailment Regimes," www</article-title>
          .w3.org/TR/2013/REC-sparql11
          <string-name>
            <surname>-</surname>
          </string-name>
          entailment-20130321/.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <given-names>D.</given-names>
            <surname>Maier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. O.</given-names>
            <surname>Mendelzon</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Y.</given-names>
            <surname>Sagiv</surname>
          </string-name>
          , \
          <article-title>Testing Implications of Data Dependencies,"</article-title>
          <source>ACM Trans. Database Syst.</source>
          , vol.
          <volume>4</volume>
          , no.
          <issue>4</issue>
          , pp.
          <volume>455</volume>
          {
          <issue>469</issue>
          ,
          <year>1979</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <given-names>C.</given-names>
            <surname>Beeri</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Vardi</surname>
          </string-name>
          , \
          <article-title>Formal Systems for Tuple and Equality Generating Dependencies,"</article-title>
          <source>SIAM Journal on Computing</source>
          , vol.
          <volume>13</volume>
          , no.
          <issue>1</issue>
          , pp.
          <volume>76</volume>
          {
          <issue>98</issue>
          ,
          <year>1984</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <given-names>M.</given-names>
            <surname>Schmidt</surname>
          </string-name>
          and G. Lausen, \
          <article-title>Pleasantly Consuming Linked Data with RDF Data Descriptions," 2013, TR</article-title>
          , arXiv (submit/0758082).
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18. A. Polleres, \
          <article-title>From SPARQL to Rules (and Back),"</article-title>
          <source>in WWW</source>
          ,
          <year>2007</year>
          , pp.
          <volume>787</volume>
          {
          <fpage>796</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>M. Schmidt</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Meier</surname>
          </string-name>
          , and G. Lausen, \
          <article-title>Foundations of SPARQL Query Optimization,"</article-title>
          <source>in ICDT</source>
          ,
          <year>2010</year>
          , pp.
          <volume>4</volume>
          {
          <fpage>33</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20. W. Armstrong, \
          <article-title>Dependency Structures of Data Base Relationships,"</article-title>
          <source>in IFIP</source>
          ,
          <year>1974</year>
          , pp.
          <volume>580</volume>
          {
          <fpage>583</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <given-names>E. F.</given-names>
            <surname>Codd</surname>
          </string-name>
          , \
          <article-title>Further Normalization of the Data Base Relational Model," Data base systems</article-title>
          , pp.
          <volume>33</volume>
          {
          <issue>64</issue>
          ,
          <year>1972</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>M. Meier</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Schmidt</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Wei</surname>
          </string-name>
          , and G. Lausen, \
          <article-title>Semantic Query Optimization in the Presence of Types,"</article-title>
          <source>J. Comput. Syst. Sci.</source>
          , vol.
          <volume>79</volume>
          , no.
          <issue>6</issue>
          , pp.
          <volume>937</volume>
          {
          <issue>957</issue>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <surname>J. Sequeda</surname>
            ,
            <given-names>S. H.</given-names>
          </string-name>
          <string-name>
            <surname>Tirmizi</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          <string-name>
            <surname>Corcho</surname>
            , and
            <given-names>D. P.</given-names>
          </string-name>
          <string-name>
            <surname>Miranker</surname>
          </string-name>
          , \
          <article-title>Survey of Directly Mapping SQL Databases to the Semantic Web,"</article-title>
          <source>Knowledge Eng. Review</source>
          , vol.
          <volume>26</volume>
          , no.
          <issue>4</issue>
          , pp.
          <volume>445</volume>
          {
          <issue>486</issue>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24. \
          <article-title>Describing Linked Datasets with the VoID Vocabulary,"</article-title>
          http://www.w3.org/TR/void/.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>