Databases
The DMPACK programs use three distinct databases to store deformation monitoring entity records:
- Observation Database
-
Stores nodes, sensors, targets, observations, observation receivers, observation requests, and observation responses, with optional synchronisation tables for all record types.
- Log Database
-
Stores all log messages in single table.
- Beat Database
-
Stores heartbeat messages by unique node id.
The databases are usually located in directory /var/dmpack
or
/opt/var/dmpack
.
Administration
The sqlite3(1) program is stand-alone command-line shell for SQLite database access that allows the user to execute arbitrary SQL statements. Third-party programs provide an additional graphical user interface:
- DB Browser for SQLite (DB4S)
-
A spreadsheet-like visual interface for Linux, Unix, macOS, and Windows. (MPLv2, GPLv3)
- HeidiSQL
-
A free database administration tool for MariaDB, MySQL, MS SQL Server, PostgreSQL, and SQLite. For Windows only. (GPLv2)
- phpLiteAdmin
-
A web front-end for SQLite database administration written in PHP. (GPLv3)
- SQLiteStudio
-
A free, open source, and multi-platform SQLite database manager written in C++ that is based on the Qt framework. (GPLv3)
- SQLite Web
-
A web-based SQLite database browser in Python. (MIT)
Entity–Relationship Model
Examples
Write all schemas of an observation database to file schema.sql
, using the
sqlite3(1) command-line tool:
$ sqlite3 /var/dmpack/observ.sqlite ".schema" > schema.sql
To dump an observation database as raw SQL to observ.sql
:
$ sqlite3 /var/dmpack/observ.sqlite ".dump" > observ.sql
Dump only table logs
of a log database:
$ sqlite3 /var/dmpack/log.sqlite ".dump 'logs'" > log.sql