280 lines
15 KiB
HTML
280 lines
15 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
<title>Database — SeisComP Release documentation</title>
|
|
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
|
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
|
|
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
|
|
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
|
|
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
|
|
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
|
|
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
|
|
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
|
|
<script src="../../_static/doctools.js?v=888ff710"></script>
|
|
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
|
|
<link rel="index" title="Index" href="../../genindex.html" />
|
|
<link rel="search" title="Search" href="../../search.html" />
|
|
<link rel="next" title="Waveform archives" href="waveformarchives.html" />
|
|
<link rel="prev" title="SeisComP plugins" href="plugins.html" />
|
|
</head>
|
|
<body>
|
|
<div class="header">
|
|
<div class="container">
|
|
<div class="brand">
|
|
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
|
|
<!-- span class="title">SeisComP Release</span -->
|
|
<span class="version">6.9.0</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="nav">
|
|
<div class="container">
|
|
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
|
|
|
|
<div class="related" role="navigation" aria-label="related navigation">
|
|
<ul>
|
|
<li class="right">
|
|
<a href="../../genindex.html" title="General Index"
|
|
accesskey="I">
|
|
index
|
|
</a>
|
|
</li>
|
|
<li class="right">
|
|
<a href="waveformarchives.html" title="Waveform archives"
|
|
accesskey="N">
|
|
next
|
|
</a>
|
|
</li>
|
|
<li class="right">
|
|
<a href="plugins.html" title="SeisComP plugins"
|
|
accesskey="P">
|
|
previous
|
|
</a>
|
|
</li>
|
|
<li class="nav-item nav-item-0">
|
|
<a href="../../index.html">Home</a>
|
|
</li>
|
|
<li class="nav-item nav-item-1">
|
|
<a href="../concepts.html" accesskey="U">Concepts</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="container">
|
|
<div class="fitted content" id="anchors-container">
|
|
<div class="body" role="main">
|
|
|
|
<section id="database">
|
|
<span id="concepts-database"></span><h1>Database<a class="headerlink" href="#database" title="Permalink to this heading">¶</a></h1>
|
|
<section id="scope">
|
|
<h2>Scope<a class="headerlink" href="#scope" title="Permalink to this heading">¶</a></h2>
|
|
<p>This chapter provides an overview over databases supported by <cite>SeisComP</cite>.</p>
|
|
</section>
|
|
<section id="overview">
|
|
<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this heading">¶</a></h2>
|
|
<p><cite>SeisComP</cite> can store and read information from a relational database management
|
|
system (RDBMS). Supported are basically all existing RDBMS for which a plugin
|
|
can be written. Currently, <a class="reference internal" href="plugins.html#concepts-plugins"><span class="std std-ref">database plugins</span></a> are
|
|
provided for</p>
|
|
<table class="docutils align-left">
|
|
<colgroup>
|
|
<col style="width: 50.0%" />
|
|
<col style="width: 50.0%" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="row-odd"><th class="head"><p>Database</p></th>
|
|
<th class="head"><p>Plugin Name</p></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="row-even"><td><p>MySQL / MariaDB</p></td>
|
|
<td><p><em>dbmysql</em></p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p>PostgreSQL</p></td>
|
|
<td><p><em>dbpostgresql</em></p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p>SQLite3</p></td>
|
|
<td><p><em>dbsqlite3</em></p></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<section id="database-access">
|
|
<h3>Database access<a class="headerlink" href="#database-access" title="Permalink to this heading">¶</a></h3>
|
|
<p>Typically, the database is accessed by the messaging (<a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a>) for
|
|
reading and writing.
|
|
Most other modules can only read from the database but do not write into it.
|
|
Among the few exceptions which can also directly write to the database are
|
|
<a class="reference internal" href="../../apps/scdb.html#scdb"><span class="std std-ref">scdb</span></a> and <a class="reference internal" href="../../apps/scardac.html#scardac"><span class="std std-ref">scardac</span></a>.</p>
|
|
<p>The database connection provided by the messaging is configured by the
|
|
<a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster module configuration</span></a>. <a class="reference internal" href="modules.html#concepts-modules"><span class="std std-ref">Modules</span></a>
|
|
connected to the messaging receive the read connection parameters through the
|
|
messaging connection. However, the default read connection by these and all
|
|
other modules may be set with <a class="reference internal" href="../../apps/global.html#confval-database"><code class="xref std std-confval docutils literal notranslate"><span class="pre">database</span></code></a> in
|
|
<a class="reference internal" href="../../apps/global.html#global-configuration"><span class="std std-ref">global configuration</span></a> or set on the command line
|
|
using <code class="xref std std-option docutils literal notranslate"><span class="pre">--database</span></code> or simply <code class="xref std std-option docutils literal notranslate"><span class="pre">-d</span></code>.
|
|
Read the sections <a class="reference internal" href="../installation.html#installation"><span class="std std-ref">SeisComP Installation</span></a> and <a class="reference internal" href="../getting-started.html#getting-started"><span class="std std-ref">Getting Started with SeisComP</span></a> on the
|
|
installation and the configuration of the database backend and the initial setup
|
|
of the database itself, respectively.</p>
|
|
<p>The database connection may be used together with the <em>debug</em> option to print
|
|
the database commands along with debug log output. Example for using
|
|
<a class="reference internal" href="../../apps/scolv.html#scolv"><span class="std std-ref">scolv</span></a> in offline mode with database debug output:</p>
|
|
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scolv<span class="w"> </span>-d<span class="w"> </span>localhost?debug<span class="w"> </span>--offline<span class="w"> </span>--debug
|
|
</pre></div>
|
|
</div>
|
|
</section>
|
|
<section id="database-schema">
|
|
<h3>Database schema<a class="headerlink" href="#database-schema" title="Permalink to this heading">¶</a></h3>
|
|
<p>The used database schema is well defined and respected by all modules which
|
|
access the database. It is similar to the SeisComML schema (<a class="reference internal" href="../glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a>,
|
|
a version of XML) and the C++ / Python class hierarchy of the datamodel
|
|
namespace / package.</p>
|
|
<p>Information of the following objects can be stored in the database as set out in
|
|
the <a class="reference internal" href="../api-python.html#api-datamodel-python"><span class="std std-ref">documentation of the data model</span></a>.</p>
|
|
<table class="docutils align-left">
|
|
<colgroup>
|
|
<col style="width: 25.0%" />
|
|
<col style="width: 75.0%" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="row-odd"><th class="head"><p>Object</p></th>
|
|
<th class="head"><p>Description</p></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="row-even"><td><p><a class="reference internal" href="configuration.html#concepts-configuration"><span class="std std-ref">Config</span></a></p></td>
|
|
<td><p>station bindings</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference internal" href="../api-python.html#api-datamodel-python"><span class="std std-ref">DataAvailability</span></a></p></td>
|
|
<td><p>information on continuous data records</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference internal" href="../api-python.html#api-datamodel-python"><span class="std std-ref">EventParameters</span></a></p></td>
|
|
<td><p>derived objects like picks, amplitudes, magnitudes origins, events, etc.</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference internal" href="inventory.html#concepts-inventory"><span class="std std-ref">Inventory</span></a></p></td>
|
|
<td><p>station meta data</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference internal" href="../api-python.html#api-datamodel-python"><span class="std std-ref">Journaling</span></a></p></td>
|
|
<td><p>information on commands and actions, e.g., by <a class="reference internal" href="../../apps/scevent.html#scevent-journals"><span class="std std-ref">scevent</span></a></p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference internal" href="../api-python.html#api-datamodel-python"><span class="std std-ref">QualityControl</span></a></p></td>
|
|
<td><p>waveform quality control parameters</p></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="admonition note">
|
|
<p class="admonition-title">Note</p>
|
|
<p>The Config parameters just cover station bindings. Application/module specific
|
|
configurations (all .cfg files) are not stored in the database and only kept
|
|
in files.</p>
|
|
</div>
|
|
<p>The currently supported version of the database schema can be queried by any
|
|
module connecting to the data base using the option <code class="xref std std-option docutils literal notranslate"><span class="pre">-V</span></code>. Example:</p>
|
|
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>scm<span class="w"> </span>-V
|
|
|
|
<span class="w"> </span>scm
|
|
<span class="w"> </span>Framework:<span class="w"> </span><span class="m">6</span>.0.0<span class="w"> </span>Development
|
|
<span class="w"> </span>API<span class="w"> </span>version:<span class="w"> </span><span class="m">16</span>.0.0
|
|
<span class="w"> </span>Data<span class="w"> </span>schema<span class="w"> </span>version:<span class="w"> </span><span class="m">0</span>.12
|
|
<span class="w"> </span>GIT<span class="w"> </span>HEAD:<span class="w"> </span>5e16580cc
|
|
<span class="w"> </span>Compiler:<span class="w"> </span>c++<span class="w"> </span><span class="o">(</span>Ubuntu<span class="w"> </span><span class="m">11</span>.4.0-1ubuntu1~22.04<span class="o">)</span><span class="w"> </span><span class="m">11</span>.4.0
|
|
<span class="w"> </span>Build<span class="w"> </span>system:<span class="w"> </span>Linux<span class="w"> </span><span class="m">6</span>.2.0-26-generic
|
|
<span class="w"> </span>OS:<span class="w"> </span>Ubuntu<span class="w"> </span><span class="m">22</span>.04.3<span class="w"> </span>LTS<span class="w"> </span>/<span class="w"> </span>Linux
|
|
</pre></div>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
<section id="related-modules">
|
|
<h2>Related Modules<a class="headerlink" href="#related-modules" title="Permalink to this heading">¶</a></h2>
|
|
<ul class="simple">
|
|
<li><p><a class="reference internal" href="../../apps/scardac.html#scardac"><span class="std std-ref">scardac</span></a></p></li>
|
|
<li><p><a class="reference internal" href="../../apps/scdb.html#scdb"><span class="std std-ref">scdb</span></a></p></li>
|
|
<li><p><a class="reference internal" href="../../apps/scdbstrip.html#scdbstrip"><span class="std std-ref">scdbstrip</span></a></p></li>
|
|
<li><p><a class="reference internal" href="../../apps/scdispatch.html#scdispatch"><span class="std std-ref">scdispatch</span></a></p></li>
|
|
<li><p><a class="reference internal" href="../../apps/scquery.html#scquery"><span class="std std-ref">scquery</span></a></p></li>
|
|
<li><p><a class="reference internal" href="../../apps/scqueryqc.html#scqueryqc"><span class="std std-ref">scqueryqc</span></a></p></li>
|
|
<li><p><a class="reference internal" href="../../apps/scxmldump.html#scxmldump"><span class="std std-ref">scxmldump</span></a></p></li>
|
|
</ul>
|
|
</section>
|
|
</section>
|
|
|
|
|
|
<div id="anchors-bottom"></div>
|
|
</div>
|
|
|
|
<div class="sidebar" role="navigation" aria-label="main navigation">
|
|
<div id="anchors-top"></div>
|
|
<div id="anchors" class="content">
|
|
<div id="searchbox" style="display: none" role="search">
|
|
<h3 id="searchlabel">Quick search</h3>
|
|
<div class="searchformwrapper">
|
|
<form class="search" action="../../search.html" method="get">
|
|
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
|
<input type="submit" value="Go" />
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<script>document.getElementById('searchbox').style.display = "block"</script>
|
|
<div>
|
|
<h3><a href="../../index.html">Table of Contents</a></h3>
|
|
<ul>
|
|
<li><a class="reference internal" href="#">Database</a><ul>
|
|
<li><a class="reference internal" href="#scope">Scope</a></li>
|
|
<li><a class="reference internal" href="#overview">Overview</a><ul>
|
|
<li><a class="reference internal" href="#database-access">Database access</a></li>
|
|
<li><a class="reference internal" href="#database-schema">Database schema</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a class="reference internal" href="#related-modules">Related Modules</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
</div>
|
|
<div>
|
|
<h4>Previous topic</h4>
|
|
<p class="topless"><a href="plugins.html"
|
|
title="previous chapter">SeisComP plugins</a></p>
|
|
</div>
|
|
<div>
|
|
<h4>Next topic</h4>
|
|
<p class="topless"><a href="waveformarchives.html"
|
|
title="next chapter">Waveform archives</a></p>
|
|
</div>
|
|
<div role="note" aria-label="source link">
|
|
<h3>This Page</h3>
|
|
<ul class="this-page-menu">
|
|
<li><a href="../../_sources/base/concepts/database.rst.txt"
|
|
rel="nofollow">Show Source</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="footer">
|
|
<div class="container">
|
|
<div class="horizontal layout content">
|
|
<a class="fade-in" href="https://www.gempa.de" target="_blank">
|
|
<img class="brand" src="../../_static/brands/gempa.svg"/>
|
|
</a>
|
|
<div class="stretched align-center fitted content">
|
|
<div>
|
|
Version <b>6.9.0</b> Release
|
|
</div>
|
|
<div class="copyright">
|
|
Copyright © gempa GmbH, GFZ Potsdam.
|
|
</div>
|
|
</div>
|
|
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
|
|
<img class="brand" src="../../_static/brands/gfz.svg"/>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |