Personal tools

Difference between revisions of "Database structure"

From PhotoVoltaic Logger new generation

Jump to: navigation, search
m (pvlng_tree)
m (pvlng_reading_num / pvlng_reading_str)
Line 21: Line 21:
 
[[File:DBTableTree.png]]
 
[[File:DBTableTree.png]]
  
== pvlng_reading_num / pvlng_reading_str ==
+
== pvlng_reading_num / pvlng_reading_str - Measuring data storage==
 
 
Measuring data storage tables
 
 
 
  
 
[[File:DBTableReadingNum.png]] [[File:DBTableReadingStr.png]]
 
[[File:DBTableReadingNum.png]] [[File:DBTableReadingStr.png]]
 
  
 
The difference between the reading tables is only the data format for reading values.
 
The difference between the reading tables is only the data format for reading values.

Revision as of 15:07, 13 May 2014

pvlng_type - Channel types

DBTableType.png

pvlng_channel - Channels

DBTableChannel.png

pvlng_tree - Channel hierarchy

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.


DBTableTree.png

pvlng_reading_num / pvlng_reading_str - Measuring data storage

DBTableReadingNum.png DBTableReadingStr.png

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.

pvlng_babelkit

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


DBTableBabelkit.png