-------------------------------------------------------------------------------
open Optimized Storage for time series Data
-------------------------------------------------------------------------------
1. INTRO
1.1 ABOUT
OStsD is a lib for storage of temporal data in a relational database.
This project is only for application developpers not for end users.
The motivation is to store not frequently changing data (such as
weather data, energy measurements, or some process data) but with
an unpredictable and potentially fast changing values (sometimes).
So the sampling rate should be quite high but the archival must
avoid a lot of values in order to preserve storage capacity.
In this library it's done using two parameters associated with
each variable : Delta V (enough value change) & Delta T (last
archival date is enough distant).
Data retrieval reconstitutes the temporal suite, by adding samples.
Data are stored in basic tables without compression. It's a choice.
This gives the ability to access it without using my library, from
every kind of other applications.
This document is subject to change.
1.2 CREDITS
The project was created by F. Chaxel, in 2016.
2. USAGE
2.1 DATABASE
Database setup must be done. Tables creation also : SQL scripts are
given. Only the C# code creates the tables & index if required.
The storage table OStsDVals uses a DOUBLE datatype for values. Every
kind of basic types can be stored inside without lost.
Alternative storage tables can be referenced for every datatype (Byte,
UInt16, ....) using the content of the OStsDStorage table : see the
SQL scripts for that.
The alternative storage tables must have the same fields than
OStsDVals, except of course the Val datatype.
The user application must open the connexion, and check it's validity
along the usage.
A class, OSstD, is the central element for archival operations : in
Qt C++, C#, Java.
2.2 CREATE VARIABLES
In each languages a method is given for that :
int CreateHistoricalVar (....
but the table OStsVars can be populated by an external tool also.
The added variable get an Id in the OStsDVars table. This primary
key can be given in the method call, if not the value is automatic.
The primary key value is return.
2.3 VALUES STORAGE
In each languages a method is given for that :
void InsertHistoricalValue (...
Null values can be given.
Only one process can stores safely a given variable, but several
processes can do storage and retrieval at the same time.
2.4 SELECT
In each languages a method is given for that :
xxxx SelectHistoricalValues (...
Return type is not the same in all language, but each one
gives a clean reconstituted temporal suite. Today interpolation
method can be None or Linear : for instance with the database values
(20.0 at 10:00:00) and (24.0 at 10:10:00) query requested at 10:05:00
gives 20.0 (Interpolation.None) or 22.0 (Interpolation.Linear).
2.4 DELETE, UPDATE
Do it by yourself if required.
3. TESTS
Tests made :
- with SqlServer, MySql, SqlServerCe in C#
- with SQLite in Qt
- with Apache Derby in Java under Netbeans
4. SUPPORT
There's no support for the project at this time, and certainly never.
If you write to me, I'm unlikely to answer.
5. REPORT ERRORS
Yes, there be errors alright. There always are. Many won't be interesting
though. Eg. if you find a computer that behaves differently from others,
I'm unlikely to care. This is not a commercial project and I'm not trying
to push it to the greater good of the GPL world. (This may change though.)
If you find a bug, write to me using the Sourceforge link..
6. CONTRIBUTE
Really? You think it's missing something? It's not really meant as a huge
project, but if you really must, try contacting me using the Sourceforge
link.
7. MISC
Project web page is located at:
https://sourceforge.net/projects/ostsd/
8. DEV. ROADMAP
Maybe python via ODBC. Certainly only to get back data