Embedded database

BrowseName: SQLiteStore
SuperType: Store (Store)
TypeView path: Tipi > DataStores > Database interno

Object that represents an SQLite project embedded database at runtime.

Applications

Used to store data to support other project objects. When used to store Event logger or Data logger object data, for each object the data are stored in a dedicated database table.

Note

the database is represented by this object and is generated by the runtime components of UNIQO once the Q Application is started on the target device. Is based on SQLite and consists of a single persistent file at runtime in the ApplicationFiles folder of the Q Application. The database generated has as filename the NodeId of the relative object.

Configuring the object

Limit the maximum database size

Set a record limit using the Record limit property.

Consider the following notes:

  • The property only takes effect if there is at least one column in the table named Timestamp or Time of the DateTime type… note:: the Timestamp or Time columns are automatically added to the table when using a database to store data from a logger.

  • The minimum value accepted is 1000.

  • At the start of the project, any records in excess of the set limit are deleted.

  • The deletion of records occurs when a threshold equal to 0.1% of the limit value is exceeded. For example, if Record limit is set to 10000, once 10010 records are reached, the 10 oldest records are automatically deleted.

References

Supported data types

Below is the mapping between the UNIQO OPC UA data types, the data types supported by SQLite, and the OPC UA data types resulting from an SQL query in UNIQO.

Boolean

INTEGER

Int64

Integer

INTEGER

Int64

UInteger

INTEGER

Int64

byte

INTEGER

Int64

SByte

INTEGER

Int64

Int16

INTEGER

Int64

UInt16

INTEGER

Int64

Int32

INTEGER

Int64

UInt32

INTEGER

Int64

Int64

INTEGER

Int64

UInt64

INTEGER

Int64

Float

REAL

Double

Double

REAL

Double

DateTime

TEXT

DateTime

String

TEXT

String

NodeId

BLOB

NodeId

Properties

Name

BrowseName

DataType

Description

In memory

InMemory

Boolean

Enable/disable non-persistent storage mode. In this mode, the data are no longer available when the Q Application is restarted.

Filename

Filename

String

Customized name of the database file

Tables

Tables

Collection of SQLiteStoreTable

Database tables
(Inherited from Store)
Max column name length

MaxColumnNameLength

UInt32

Maximum length of column names
(Inherited from Store)
Max columns count

MaxColumnCount

UInt32

Max columns count
(Inherited from Store)
Data type compatibility map

DataTypeCompatibilityMap

NodeId

Map of the compatibility for the column data type
(Inherited from Store)
Status

Status

StoreStatus

Database connectivity status
(Inherited from Store)

Methods

Backup

BrowseName: Backup

Performs hot backup to file of the embedded database

InputArguments

Name

DataType

Description

OutputFilePath

ResourceUri

Path to the backup file

OutputArguments

Name

DataType

Description

Result

Boolean

Result of the backup operation

Restore

BrowseName: Restore

Performs hot restore from file of the embedded database

InputArguments

Name

DataType

Description

InputFilePath

ResourceUri

Path to the file to be restored

OutputArguments

Name

DataType

Description

Result

Boolean

Result of the restore operation

See also

Concetti correlati

DataStore (database)

Procedure correlate

Working with databases