/usr/share/gtk-doc/html/librdf/redland-storage-module-hashes.html is in librdf0-dev 1.0.17-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Store 'hashes'</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Redland RDF Library Manual">
<link rel="up" href="redland-storage-modules.html" title="Storage Modules">
<link rel="prev" href="redland-storage-modules.html" title="Storage Modules">
<link rel="next" href="redland-storage-module-memory.html" title="Store 'memory'">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="redland-storage-modules.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="redland-storage-modules.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Redland RDF Library Manual</th>
<td><a accesskey="n" href="redland-storage-module-memory.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="redland-storage-module-hashes"></a>Store 'hashes'</h2></div></div></div>
<p>This module is always present (cannot be removed) and provides
indexed storage using Redland <a class="xref" href="redland-storage.html" title="Triple stores"><span class="refentrytitle"><a name="redland-storage.top_of_page"></a>Triple stores</span>(3)</a> to
store various combinations of subject, predicate and object for
faster access. Context nodes are also stored in a hash when used.
The hashes may be in-memory (always available) or persistent via
Sleepycat/Berkeley DB (BDB) versions 2-4. It is the most mature and
primary persistent store and suitable for large models, tested in the
2-3 million range..</p>
<p>The main option requiring setting is the
<code class="literal">hash-type</code> which must be one of the supported
Redland hashes. Hash type <code class="literal">memory</code> is always
available and if BDB has been compiled in, <code class="literal">bdb</code> is
also available. Option <code class="literal">dir</code> can be used to set the
destination directory for the BDB files when used. Boolean option
<code class="literal">new</code> can be set to force creation or truncation
of a persistent hashed store. The storage
name must be given for hash type <code class="literal">bdb</code> since
it is used for a filename.
</p>
<p>The module provides optional contexts support enabled when
boolean storage option <code class="literal">contexts</code> is set. This
can be used with any hash type.</p>
<p>Examples:</p>
<pre class="programlisting">
/* A new BDB hashed persistent store in the current directory */
storage=librdf_new_storage(world, "hashes", "db1",
"new='yes',hash-type='bdb',dir='.'");
/* Hashed in-memory store */
storage=librdf_new_storage(world, "hashes", NULL,
"hash-type='memory'");
/* An existing BDB hashed persistent store in dir /somewhere */
storage=librdf_new_storage(world, "hashes", "dv2",
"hash-type='bdb',dir='/somewhere'");
/* An existing BDB hashed store with contexts */
storage=librdf_new_storage(world, "hashes", "db3",
"hash-type='bdb',contexts='yes'");
</pre>
<p>In Python:</p>
<pre class="programlisting">
from RDF import *
...
# Create a new BDB store
storage = HashStorage("db4", options="new='yes',hash-type='bdb'")
</pre>
<p>In Perl:</p>
<pre class="programlisting">
use RDF::Redland;
...
# Open an existing BDB store
$storage=new RDF::Redland::Storage("hashes", "db5",
"hash-type='bdb',dir='.'");
</pre>
<p>Summary:</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem"><p>Persistent or in-memory</p></li>
<li class="listitem"><p>Suitable for larger models</p></li>
<li class="listitem"><p>Indexed</p></li>
<li class="listitem"><p>Large disk usage with BDB</p></li>
<li class="listitem"><p>Optional contexts (with option <code class="literal">contexts</code> set)</p></li>
</ul></div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18</div>
</body>
</html>
|