<!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>Using Triples as the Data Model for Blockchain Systems</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Stuttgart, IPVS</institution>
          ,
          <addr-line>70569 Stuttgart</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Current permissioned blockchain systems utilize the keyvalue data model to store and query the ledger. As the key-value pairs are not su ciently expressive to represent relationships between data, we present a proposal for the utilization of triples as the data model for blockchain systems. This approach enables a powerful query engine and reduces the number of data stores that have to be maintained.</p>
      </abstract>
      <kwd-group>
        <kwd>blockchain</kwd>
        <kwd>data model</kwd>
        <kwd>Merkle B-tree</kwd>
        <kwd>query</kwd>
        <kwd>triple</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Copyright c 2019 for this paper by its authors.</p>
      <p>Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).
2 World State</p>
      <p>Key-value store
(Document store)</p>
      <p>is derived from
r
ge 1 Blockchain
d
e
L</p>
    </sec>
    <sec id="sec-2">
      <title>Block n-2</title>
      <sec id="sec-2-1">
        <title>Header</title>
      </sec>
      <sec id="sec-2-2">
        <title>TRXN</title>
        <p>...</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Block n-1</title>
      <sec id="sec-3-1">
        <title>Header</title>
      </sec>
      <sec id="sec-3-2">
        <title>TRXN</title>
        <p>...
lep key value
xamCAR0 {color:“blue“,make:“Ford“}
E
latest application state
queries</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Query</title>
    </sec>
    <sec id="sec-5">
      <title>Engine</title>
    </sec>
    <sec id="sec-6">
      <title>Block n</title>
      <sec id="sec-6-1">
        <title>Header</title>
      </sec>
      <sec id="sec-6-2">
        <title>TRXN</title>
        <p>...</p>
      </sec>
      <sec id="sec-6-3">
        <title>Transaction</title>
      </sec>
      <sec id="sec-6-4">
        <title>Key Value</title>
        <p>... ...</p>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>Query</title>
      <p>Engine
queries
historical
application
state
queries
latest
application</p>
      <p>state
latest application state
lxaEepmeCCnAAtRRit00y ccaaatrtr/r/imcboualokteer vFbaolluruede Me&lt;rkTl.rei.p.Ble-&gt;tree
directly on the blockchain data, eliminating the maintenance of additional data
stores. Our approach addresses the key issues of preserving the integrity of the
blockchain's data structure, maintaining an e cient data representation, and
supporting a powerful query engine.</p>
      <p>
        Our blockchain ( 3 in Figure 1) implementation utilizes Merkle B-trees [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
A Merkle B-tree contains all triples that re ect the respective application state.
Each block is represented by two Merkle B-trees where the rst one is sorted by
&lt;entity, attribute&gt; and the second one by &lt;attribute, entity&gt;. The latest
application state is always stored in the last block, any historical application state
in one of the preceding blocks. A query engine supporting a SPARQL-like query
language uses these two Merkle B-trees within a block to e ciently compute the
result of a query.
      </p>
      <p>This implementation, however, has high storage requirements and requires
several optimization mechanisms. The use of techniques such as data
compression, data deduplication, and data encoding as well as the reuse of already stored
data structures contribute to reducing storage usage.</p>
      <p>Future work will entail the research of further optimization mechanisms, the
mechanism and format for exposing the triple data model to smart contracts as
well as the development and evaluation of a prototype implementation.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Androulaki</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          , et al.:
          <article-title>Hyperledger fabric: A distributed operating system for permissioned blockchains</article-title>
          .
          <source>In: Proceedings of the Thirteenth EuroSys Conference</source>
          . pp.
          <volume>30</volume>
          :
          <issue>1</issue>
          {
          <fpage>30</fpage>
          :
          <fpage>15</fpage>
          . EuroSys '18,
          <string-name>
            <surname>ACM</surname>
          </string-name>
          , New York, NY, USA (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          , et al.:
          <article-title>Dynamic authenticated index structures for outsourced databases</article-title>
          .
          <source>In: Proceedings of the 2006 ACM SIGMOD International Conference on Management of Data</source>
          . pp.
          <volume>121</volume>
          {
          <fpage>132</fpage>
          .
          <string-name>
            <surname>ACM</surname>
          </string-name>
          (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>