Ask a Question

ClearSCADA: data grid vs. data table

In ClearSCADA it is possible to store values in either a data grid or in a data table; but which one should you choose? This article explains the difference between the two and helps you to choose the correct object for your application.

Start by using this decision chart to help you choose which object to use:

The ClearSCADA database consists of a series of pre-configured tables that define the system. Data Grids and Data Tables allow you to add ‘custom’ tables to the ClearSCADA database. There are fundamental differences between Grids and Tables and you must understand them so you can properly select the appropriate one for use in your system.

Data Grids
Data Grids are not general purpose tables in which you can store user data. Data Grids are used to collate, organize and summarize data from elsewhere in the database and present it in a tabular format that can be queried from. Simply put, Data Grids do not store data; they provide a link to the database item, which the current value of the database property will be displayed in the table.

A Data Grid’s table consists of user-defined fields and a user-defined number of records. Each cell in the table contains an expression that calculates a value. The expression can simply map a value from an item in the database, be a simple literal (constant) value, or a more complex calculation.

You can then configure, for example, a report, to access the Data Grid’s table, in order to display the results of each calculation.

Operators can display a Data Grid’s table as a List and navigate and sort the data in that List.

Data Tables
Data Tables are general purpose tables in which you can store user data, much like any other table in the database.

A Data Table consists of user-defined fields and its records populated and maintained based upon SQL INSERT, UPDATE and DELETE commands. You can use Structured Text logic programs to automatically populate the data table based on a trigger or schedule.