How are data for a Tags stored
To be able to store Tag Process or Meta Data users have to create a tag configuration first. As described by the chapter Core Concept behind recording process and meta data for process tags, the tag configuration represents a hierarchy structure with a lot of variability.
Every tag configuration, which in EAV terms equals an entity, is defined by a unique combination of a Device Name and Tag Name inside Litmus Production Record Database, which will get its own distinct ID assigned.
In the example below, the unique combination is Device 1 / Tag 1.
All further definitions for this hierarchy such as Value and Alarm (green boxes as process values) as well as Plant, Line and Asset (purple boxes as meta data) are in EAV terms attributes.
The relation between an entity and an attribute is created by forming a relation between the respective ID of the entity and the ID's of an attribute.
Data are later recorded just with the reference to their respective attribute.
In most use cases for an EAV data model like:
- Patient records
- Recording observations
data are stored directly against an entity itself.
This is also done for both process and meta data for tags, despite that the data are recorded on a continues base.
Such a way of recording is possible, as Litmus Production Record Database borrows a further concept from what many may consider a historian principle, which is to record also the time a value has been recorded called the RecordTime in Litmus Production Record Database.
This makes Litmus Production Record Database borrow concepts from a timeseries historian as well as an EAV database model.
Users are therefore able to retrieve tag data by searching for the combination of device name, tag name and item as well as the time frame, similar to how users would retrieve data from a historian.
Example is shown by the chapters: