Difference between revisions of "Database structure"
From PhotoVoltaic Logger new generation
m |
m |
||
Line 3: | Line 3: | ||
[[Category:Internals]] | [[Category:Internals]] | ||
− | == | + | == Channel types (pvlng_type) == |
[[File:DBTableType.png]] | [[File:DBTableType.png]] | ||
− | == pvlng_channel | + | == Channels (pvlng_channel) == |
[[File:DBTableChannel.png]] | [[File:DBTableChannel.png]] | ||
− | == | + | == Channel hierarchy (pvlng_tree) == |
The channel tree is organized in a nested set structure. | The channel tree is organized in a nested set structure. | ||
Line 24: | Line 24: | ||
[[File:DBTableTree.png]] | [[File:DBTableTree.png]] | ||
− | == | + | == Measuring data storage (pvlng_reading_num, pvlng_reading_str) == |
[[File:DBTableReadingNum.png]] [[File:DBTableReadingStr.png]] | [[File:DBTableReadingNum.png]] [[File:DBTableReadingStr.png]] | ||
Line 34: | Line 34: | ||
It was tested and have significant more performance for consolidated data readouts. | It was tested and have significant more performance for consolidated data readouts. | ||
− | == pvlng_babelkit | + | == Translations (pvlng_babelkit) == |
Here are stored all translations for the [[:Category:Web frontend|web frontend]] based on the "BabelKit - Multilingual Code Description Lookup Table" <ref>http://www.webbysoft.com/babelkit/</ref> project. | Here are stored all translations for the [[:Category:Web frontend|web frontend]] based on the "BabelKit - Multilingual Code Description Lookup Table" <ref>http://www.webbysoft.com/babelkit/</ref> project. |
Revision as of 11:58, 14 May 2014
Channel types (pvlng_type)
Channels (pvlng_channel)
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.
Measuring data storage (pvlng_reading_num, pvlng_reading_str)
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.
Translations (pvlng_babelkit)
Here are stored all translations for the web frontend based on the "BabelKit - Multilingual Code Description Lookup Table" [1] project.