Promotic
WikipediaLinkedInYoutubeTwitterFacebook

MySQL data saving into the one table (Database MySQL cyclic)

Description:
The window serves for setting the parameters for the data storage into the MySql database. By this technology the data are stored into tables (in the MySQL database) with the name specified in Table configurator. The minimum and maximum size of the table is defined. If the current size of the table exceeds the maximum size, so many oldest records are removed to decrease the size to the minimum size of the table. This walkthrough repeats all over again. By the RunTime method it is possible to do backward writing for this type of setting the storage (it is possible to write even the records with the older time than the time of the last written record).

By this technology the writing is performed by means of the ODBC driver for MySQL database, which has to be installed to the computer were the PROMOTIC application is running.

Configuration items:
Data source (ConnectionString)The ADO ConnectionString (www.connectionstrings.com) contains all necessary parameters needed by the ADO Connection object for database connection via the selected ADO Provider.

Macro expression can be used for input (it is evaluated while the application is launching).

This configurator must not contain an empty string.For example Provider=MSDASQL;Driver={MySQL ODBC 3.51 Driver};","Server=localhost;Database=pm_data;Uid=pm_writer;Pwd=pmwriter;"
Additional parameters Additional parameters for saving. Allow to define names and data types of system columns, database types based on the trended value data type. Available parameters are shown in the following example together with their preset values for selectaed saving type (plugin). These values may not be entered. Enter the values only if non-default are needed. Entries with assigned value are separated by a semicolon, for example "coltimename:pm_time;colattrname:pm_attr;dbdt.pmtime:DATETIME;dbdt.pmattr:FLOAT(10,0);dbdt.f64:FLOAT(10,3);dbdt.f32:FLOAT(10,3);dbdt.i32:FLOAT(10,0);dbdt.i16:FLOAT(5,0);dbdt.u8:INT;dbdt.b:BIT;".

Macro expression can be used for input (it is evaluated while the application is launching).

coltimename (optional) - Name of column containing the record timestamp.(default) "coltimename:pm_time;".
colattrname (optional) - Name of column containing the record attribute.(default) "colattrname:pm_attr;".
dbdt.pmtime (optional) - Database data type of the column containing record timestamp.(default) "dbdt.pmtime:DATETIME;".
dbdt.pmattr (optional) - Database data type of the column containing record attribute.(default) "dbdt.pmattr:FLOAT(10,0);".
dbdt.f64 (optional) - Database data type of the column for trended value of the Float64 (Double) data type.This is used if the trended value does not have its database data type defined.(default) "dbdt.f64:FLOAT(10,3);".
dbdt.f32 (optional) - Database data type of the column for trended value of the Float32 (Single) data type.This is used if the trended value does not have its database data type defined.(default) "dbdt.f32:FLOAT(10,3);".
dbdt.i32 (optional) - Database data type of the column for trended value of the Int32 (Long) data type.This is used if the trended value does not have its database data type defined.(default) "dbdt.i32:FLOAT(10,0);".
dbdt.i16 (optional) - Database data type of the column for trended value of the Int16 (Integer) data type.This is used if the trended value does not have its database data type defined.(default) "dbdt.i16:FLOAT(5,0);".
dbdt.u8 (optional) - Database data type of the column for trended value of the Uint8 (Byte) data type.This is used if the trended value does not have its database data type defined.(default) "dbdt.u8:FLOAT(3,0);".
dbdt.b (optional) - Database data type of the column for trended value of the Bool (Boolean) data type.This is used if the trended value does not have its database data type defined.(default) "dbdt.b:BIT;".
TableName of the table in the database into which the data are stored.

Macro expression can be used for input (it is evaluated while the application is launching).

This configurator must not contain an empty string.
Minimum table sizeMinimum size of the table specified by the records count. The records count in the table never drops below this minimum limit.
Maximum table sizeMaximum size of the table specified by the records count. The records count in the table never exceeds this maximum limit. When exceeding this limit, such count of the oldest records is removed to decrease the records count in the table to the minimum size of the table.

The value -1 means that the maximum size of the table is not limited by the records count.

Minimum table size by time intervalMinimum size of the table specified by the time interval. The time size of table records never drops below this minimum limit.
Maximum table size by time intervalMaximum size of the table specified by the time interval. The maximum time size of all records in the table. When exceeding this limit, such count of the oldest records is removed to decrease the records count in the table to the minimum size of the table.

The value -1 means that the maximum size of the table is not limited by the time size.

Note:
If the writing operation of a record into the database fails, the PROMOTIC system will try to write the record two more times. If the writing operation of a record fails because of network error (timeout), the PROMOTIC system closes the connection and will try to connect and write the record during following writings (of the same or another record). If the connection is regained, the writing of trend records continoues automatically. If the network failure continues during a longer period of time, some records may be lost. The information regading writing errors on network failure will be written into the global error page of the INFO system.
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice