Personal tools

Database structure

From PhotoVoltaic Logger new generation

Jump to: navigation, search

There is also a database schema generated with schemaSpy.

General

Here are the most important tables with their references:


DBStructure.png

Channel types

pvlng_type

Error creating thumbnail: Unable to save thumbnail to destination

Channels

pvlng_channel

Error creating thumbnail: Unable to save thumbnail to destination

Channel hierarchy

pvlng_tree

The channel tree is organized in a nested set structure.

The nested set model is a particular technique for representing nested sets (also known as trees or hierarchies) in relational databases.

The nested set model is to number the nodes according to a tree traversal, which visits each node twice, assigning numbers in the order of visiting, and at both visits. This leaves two numbers for each node, which are stored as two attributes. Querying becomes inexpensive: hierarchy membership can be tested by comparing these numbers. Updating requires renumbering and is therefore expensive.

Wikipedia:Nested set model

More theory about nested sets.


Error creating thumbnail: Unable to save thumbnail to destination

Measuring data storage

pvlng_reading_num, pvlng_reading_str

Error creating thumbnail: Unable to save thumbnail to destination
Error creating thumbnail: Unable to save thumbnail to destination

The difference between the reading tables is only the data format for reading values.

The timestamps are not stored as "normal" timestamp type, but as unsigned integer.

It was tested and have significant more performance for consolidated data readouts.

Dashboards

pvlng_dashboard

Error creating thumbnail: Unable to save thumbnail to destination

Tariffs

pvlng_tariff

Error creating thumbnail: Unable to save thumbnail to destination

pvlng_tariff_date

Error creating thumbnail: Unable to save thumbnail to destination

pvlng_tariff_time

Error creating thumbnail: Unable to save thumbnail to destination

Charts

pvlng_view

Error creating thumbnail: Unable to save thumbnail to destination

Translations

pvlng_babelkit

Here are stored all translations for the web frontend based on the "BabelKit - Multilingual Code Description Lookup Table" [1] project.

Error creating thumbnail: Unable to save thumbnail to destination

The "changed" column is used to detect recently changed translations for upgrade SQLs


  1. http://www.webbysoft.com/babelkit/