Stella Enterprise can work with a variety of SQL databases. To do so the databases will need to contain tables with fields that Stella can write data to, and read data from. Stella has default names for the tables and fields, and these are used in the sample table definitions included below. The examples are all basic SQL tables, but it is also possible to use Views for reading and implement triggers to manipulate data as or after it is written depending on the SQL implementation.
The table content is discussed further in Working with Databases.
The var_val table is intended for import, though it can also be used for export in overwrite and append modes. Its basic structure is quite simple. It contains a field for the variable name and another for the value.
The run table contains basic run information.
The run_use table references the run table and in turn referenced by the run_data table.
The run_data table hold the actual values and references the run_use table.
The run_data_point table is an alternative to run_data that holds both time and value (so there is one run_data_point record for each time) which will use more space but may be easier to access with other applications.
The table definitions are largely the same for different SQL implementations, but the way that unique automatically generated indexes works is different in each. Additional attributes such as uniqueness of the GUID for the run table or dependence of the run_use table id for the run_data table could also be added, though Stella will ensure consistency in any case.
Snowflake is a web based database that has ODBC drivers which can be configured to work on desktops and servers. Using the My SQL table definition will work with with Snowflake.
CREATE TABLE var_val (
var varchar(255),
vals varchar(2048)
);
CREATE TABLE run (
id int NOT NULL AUTO_INCREMENT,
run_detail varchar(512) NOT NULL,
guid varchar(64) NOT NULL,
model_guid varchar(64) NOT NULL,
primary key (id)
);
CREATE TABLE run_use (
id int NOT NULL AUTO_INCREMENT,
run_id int,
use_detail varchar(512) NOT NULL,
model_guid varchar(64) NOT NULL,
primary key (id)
);
CREATE TABLE run_data (
run_use_id int NOT NULL,
var_name varchar(255) NOT NULL,
var_values varchar(2048)
);
CREATE TABLE run_data_point (
run_use_id int NOT NULL,
var_name varchar(255) NOT NULL,
time_value double,
var_value double
);
CREATE TABLE var_val (
var varchar(255),
vals varchar(2048)
);
CREATE TABLE run (
id serial primary key,
run_detail varchar(512) NOT NULL,
guid varchar(64) NOT NULL,
model_guid varchar(64) NOT NULL
);
CREATE TABLE run_use (
id serial primary key,
run_id int NOT NULL,
use_detail varchar(512) NOT NULL,
model_guid varchar(64) NOT NULL
);
CREATE TABLE run_data (
run_use_id int NOT NULL,
var_name varchar(255) NOT NULL,
var_values varchar(2048)
);
CREATE TABLE run_data_point (
run_use_id int NOT NULL,
var_name varchar(255) NOT NULL,
time_value double precision,
var_value double precision
);
CREATE TABLE var_val (
var varchar(255),
vals varchar(2048)
);
CREATE TABLE run (
id int IDENTITY(1,1) PRIMARY KEY,
run_detail varchar(512) NOT NULL,
guid varchar(64) NOT NULL,
model_guid varchar(64) NOT NULL
);
CREATE TABLE run_use (
id int IDENTITY(1,1) PRIMARY KEY,
run_id int NOT NULL,
use_detail varchar(512) NOT NULL,
model_guid varchar(64) NOT NULL
);
CREATE TABLE run_data (
run_use_id int NOT NULL,
var_name varchar(255) NOT NULL,
var_values varchar(2048)
);
CREATE TABLE run_data_point (
run_id int NOT NULL,
var_name varchar(255) NOT NULL,
time_value double precision,
var_value double precision
);