<!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>A Semantics-Oriented Storage Model for Big Heterogeneous RDF Data</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science, North Carolina State University</institution>
          ,
          <addr-line>Raleigh, NC</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Increasing availability of RDF data covering different domains is enabling ad-hoc integration of different kinds of data to suit varying needs. This usually results in large collections of data such as the Billion Triple Challenge datasets or SNOMED CT, that are not just “big” in the sense of volume but also “big” in variety of property and class types. However, techniques used by most RDF data processing systems fail to scale adequately in these scenarios. One major reason is that the storage models adopted by most of these systems, e.g., vertical partitioning, do not align well with the semantic units in the data and queries. While Big Data distributed processing platforms such as the Hadoopbased platforms offer the promise of “unlimited scale-out processing”, there are still open questions as to how best to physically partition and distribute RDF data for optimized distributed processing. In this poster, we present the idea of a semantics-oriented RDF storage model that partitions data into logical units that map to subqueries in graph patterns. These logical units can be seen as equivalence classes of star subgraphs in an RDF graph. This logical partitioning strategy enables more aggressive pruning of irrelevant query results by pruning irrelevant partitions. It also enables the possibility of semantic-query optimization for some queries such as eliminating joins under appropriate conditions. These benefits in addition to appropriate techniques for physically partitioning the logical partitions, translate to improved performance as shown by some preliminary results.</p>
      </abstract>
      <kwd-group>
        <kwd>RDF Storage Model</kwd>
        <kwd>Partitioning Scheme</kwd>
        <kwd>Hadoop</kwd>
        <kwd>MapReduce</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        The Resource Description Framework (RDF) has been widely adopted and used to
represent various datasets in many different communities such as government, life
science, and finance, etc. One challenge that arises from this phenomenon is that most
RDF datasets now contain a significant number of various properties and classes, e.g.,
105 distinct properties and classes in DBPedia [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and 400k concepts in SNOMED
CT [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. This is in contrast to popular benchmark datasets that are often used for
evaluating RDF data processing systems like LUBM1, which contain only a few hundreds
of distinct properties and classes. To efficiently process such collections, data needs to
be organized suitably into a storage model. A very common storage model is called
Vertical Partitioning [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ](VP) and its variants [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] which partition data in terms of the
:name (:n)
      </p>
      <p>S O
:prs1 “a”
:prs2 “b”
:prs3 “c”
:prs4 “e”
… …
:homepage (:h)
S O
:prs1 “a.com”
:prs4 “e.com”
… …</p>
      <p>EQ Example Instances of Equivalence Classes
[ nmhp ] { (:prs4, [ {“e”}, {e@g.com}, {“e.com”}, {xxx-xxx-xxxx} ] ) }
[ nma ] { (:prs2, [ {“b”}, {b@n.edu}, {:u4} ] ),</p>
      <p>(:prs3, [ {“c”}, {c@g.com}, {:u1, :u3} ] ) }
[ nmha ] { (:prs1, [ {“a”}, {a@g.com, a@n.edu}, {“a.com”}, …] ) }
… …
(b)
types of properties and classes in a dataset. Given a query, matching vertical partitions
are selected based on the properties in the graph pattern and then join operations are
performed using the partitions. In a sense, this approach allows all vertical partitions
corresponding to properties that are not in the query to be pruned out. However, despite
this degree of prunability, the joins between “relevant” vertical partitions still incurs
some overhead of processing irrelevant data since not all entries the vertical partitions
form joined results. For example, consider the star pattern query with properties :name,
:mbox, and :homepage. Fig. 1(a) shows the example of the execution plan and
partitioned data using the VP-based approach, which results in two join operations. The
violet-colored cells denote triples that are not relevant to query, but are processed and
discarded during expensive join operations. Furthermore, the vertical partitioning
process itself can be challenging for large heterogeneous datasets for multiple reasons.
First, it may require the management of a large number file descriptors/buffers (&gt; 105
for DBPedia) in memory during the partitioning process which can be impractical
depending on hardware architecture being used. Second, a scalability is a key design
objective on Hadoop-based frameworks, but the distributed file system used in Hadoop
(or HDFS) does not scale well when there are numerous small files2. Given these
challenges, there is a clear need for investigating novel storage and distribution schemes for
RDF on scale-out platforms such as Hadoop.
2</p>
      <p>
        Semantics-Oriented Storage Model : SemStorm
In this poster, we build on our previous works (e.g.,[
        <xref ref-type="bibr" rid="ref5 ref6">5, 6</xref>
        ]) which introduced the
notion of a triplegroup as a first class object in our data and query model. A triplegroup
is a group of triples related to the same resource (i.e. with the same subject), i.e. a star
subgraph. Fig. 1(b) shows the example triplegroup representation of our previous
example, e.g., under the equivalence class [nmha], a single triplegroup instance exists, which
contains a subject (:prs1) and objects corresponding to properties :n, :m, :h, and :a. The
benefits of both the triplegroup data model and algebra have been articulated in our
previous works, including shortening of query execution workflows, reducing the footprint
of intermediate results which impacts I/Os in distributed processing. Here, we present
an overview of an RDF storage model called SemStorm that is based on logically and
2 http://blog.cloudera.com/blog/2009/02/the-small-files-problem
      </p>
      <p>A Semantics-Oriented Storage Model for Big Heterogeneous RDF Data
physically partitioning triplegroups in a semantics-oriented way. By semantics-oriented
we mean, partitioning triplegroups into equivalence classes such that all members in an
equivalence class are equivalent with respect to queries. This approach enables more
aggressive pruning of logical partitions, i.e. equivalence classes than other approaches like
the vertical partitioningW. For example, Fig. 2 shows that we select matching
equivalence class sets (mecs): [nmha] and [nmhp], which contain all the properties in the
example query, i.e. :n,:m, and :h (ignore a type property for now such as tA). All other
remaining equivalence classes are pruned out, e.g., [nma] is not selected due to the
absence of :h. The mecs sometimes contain extra values, e.g., objects for property :a and
:p in [nmha] and [nmhp]. We later filter such values for exact matching results.
Another unique advantage of SemStorm is that it enables additional optimizations that
are not possible with other approaches, e.g., it may be possible to avoid explicitly
materializing rdf:type triples if such triples can be inferred by the label of an equivalence
class (the label of an equivalence class can be considered to be the set of
properties in that equivalence class). For example, triplegroups under an equivalence class
[pubAuthor, rdf:type with Publication] can skip materializations of Publication type
triples if a schema file contains a triple “pubAuthor rdfs:domain Publication”. Fig. 2
shows that type triples are not materialized in triplegroup instances such as tg1 and tg2,
which are denoted as (tA) for the class A. This optimization can add significant
advantages because rdf:type triples tend to be disproportionately larger than other properties
for many datasets, e.g., approx. 20% in LUBM datasets. Thus, avoiding their explicit
representation reduces the amount of I/Os needed when rdf:type triples need to be
processed and may in some cases eliminate the need to perform a join with such properties
since it is implicitly captured in the equivalence class representation.</p>
      <p>
        Implementation Issues. Triplegroups can be generated easily using a group-by
operation on a subject field of triples using a single MR job; they are then categorized based
equivalence class and stored in HDFS. Each equivalence class could be mapped into
a physical file, but it is likely that such 1:1 mappings could cause the many file issue
in case that many distinct equivalence classes are generated. To relieve the issue, we
need a heuristic that clusters equivalence classes into a smaller number of files, e.g.,
group equivalence classes that share a specific set of properties and store them together.
We also need to consider building indexes to locate matching equivalence classes from
physical files, e.g., mappings between equivalence class and their offsets in files.
Preliminary Evaluation. We evaluated three types of queries using the LUBM datasets
(450GB, Univ. 20k) on a 80-node Hadoop cluster in VCL3, where each node was
equipped with 2.33 GHz dual core CPUs, 4GB RAM, and 40GB HDD. Hive 0.124 was
selected for the VP approach. Query Q1 retrieves a list of publication authors with
Publication type triples, and Q2 additionally retrieves name (or title) of the publications.
We evaluated two variations of queries, with object field of some non-type triple pattern
bounded (high selectivity, denoted with postfix h), and same query with unbounded
object (low selectivity marked with l). Fig. 3 shows that SemStorm was 3 times faster than
Hive for Q1 because SemStorm can process queries using a Map-only job and save the
disk I/O for all the type triples. The execution time of Hive increased from Q1 to Q2
due to reading additional property relation :name but the execution time of SemStorm
was almost constant because both queries read the same equivalence classes. Finally,
Q3 was a negative query, which produces no answers. While SemStorm determined that
there are no answers (due to no matching equivalence classes) even before launching
the job, Hive executed join operations, producing 0 answer. The details are available in
the project website.5
Related Work. Our approach might be similar with Property Table [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], which groups
triples that tend to be together. However, the main difference is that the property table
is query-driven, which is built gradually based on query logs. However, SemStorm is
data-driven one, which directly can be constructed from the datasets without any query
logs. In addition, while the property table approach mainly suffers from its storage
inefficiencies, e.g., a lot of NULLs and left-over tables, our approach does not, i.e. all
triples can be transformed into triplegroups without any leftovers.
      </p>
      <p>Acknowledgment The work presented in this paper is partially funded by NSF grant
IIS-1218277.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Abadi</surname>
            ,
            <given-names>D.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Marcus</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Madden</surname>
            ,
            <given-names>S.R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hollenbach</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Scalable Semantic Web Data Management Using Vertical Partitioning</article-title>
          .
          <source>In: Proc. VLDB</source>
          . pp.
          <fpage>411</fpage>
          -
          <lpage>422</lpage>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Carroll</surname>
            ,
            <given-names>J.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dickinson</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dollin</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reynolds</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Seaborne</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wilkinson</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Jena: Implementing the Semantic Web Recommendations</article-title>
          .
          <source>In: Proc. WWW Alt</source>
          . pp.
          <fpage>74</fpage>
          -
          <lpage>83</lpage>
          (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Duan</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kementsietsidis</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Srinivas</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Udrea</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          :
          <article-title>Apples and Oranges: A Comparison of RDF Benchmarks and Real RDF Datasets</article-title>
          .
          <source>In: Proc. SIGMOD</source>
          . pp.
          <fpage>145</fpage>
          -
          <lpage>156</lpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Husain</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>McGlothlin</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Masud</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Khan</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Thuraisingham</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <source>Heuristics-Based Query Processing for Large RDF Graphs Using Cloud Computing</source>
          <volume>23</volume>
          (
          <issue>9</issue>
          ),
          <fpage>1312</fpage>
          -
          <lpage>1327</lpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Kim</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ravindra</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Anyanwu</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Scan-Sharing for Optimizing RDF Graph Pattern Matching on MapReduce</article-title>
          .
          <source>In: Proc. CLOUD</source>
          . pp.
          <fpage>139</fpage>
          -
          <lpage>146</lpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Ravindra</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kim</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Anyanwu</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>An Intermediate Algebra for Optimizing RDF Graph Pattern Matching on MapReduce</article-title>
          .
          <source>In: Proc. ESWC</source>
          . pp.
          <fpage>46</fpage>
          -
          <lpage>61</lpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Salvadores</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horridge</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Alexander</surname>
            ,
            <given-names>P.R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fergerson</surname>
            ,
            <given-names>R.W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Musen</surname>
            ,
            <given-names>M.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Noy</surname>
            ,
            <given-names>N.F.</given-names>
          </string-name>
          :
          <article-title>Using SPARQL to Query Bioportal Ontologies and Metadata</article-title>
          .
          <source>In: Proc. ISWC</source>
          . pp.
          <fpage>180</fpage>
          -
          <lpage>195</lpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>