Volatile Table

Volatile table is a temporary table where all the data are resided in a temporary memory, and enriches the results by joining log tables. You can see volatile tables as additional tables that contain various information of specified devices or equipment expressed with simple signs or numbers in log tables. Characteristics of volatile tables are as follows.

Primary Key

Primary key can be created to form a uniqueness constraint on a table column value and to specify a key column to distinguish the table data. When inserting data into a volatile table with a primary key, the primary key column value of the insert data must be different from the other primary key column values in the table. This constraint is called a uniqueness condition. The creation constraints of the primary key are as follows.

  • Primary keys can only be created in volatile tables.
  • Only one primary key column can be specified, and two or more columns can not be designated as primary keys.

Schema Preservation

The structure of volatile table (schema) information is maintained even after Marbase server has shutdown and started again. To delete the volatile table, it must execute DROP table explicitly.

Volatility Data

The data contained in volatile tables are vanished as soon as the Marbase server shutdowns. Therefore, you have to insert the records into the volatile tables again when the server re-starts.

Index and Join

For the fast data access of volatile table, it provides RED-BLACK index which provides real-time optimization. Therefore,it can be used effectively in the process of joining or searching log tables.

  • Primary key can be specified in a table column.
  • When duplicated primary key values are inserted, it can be updated with the existing data.
  • It can delete the data that matches with the the conditions of primary key values by using conditional (WHERE clause) clause.
  • _ARRIVAL_TIMEcolumn doesn't exist.

Example:

mach> CREATE VOLATILE TABLE vtable (id INTEGER PRIMARY KEY, name VARCHAR(20));
Created successfully.

​mach> DESC vtable;
----------------------------------------------------------------
NAME TYPE LENGTH
----------------------------------------------------------------
ID integer 11
NAME varchar 20
[ INDEX ]
----------------------------------------------------------------
NAME TYPE COLUMN
----------------------------------------------------------------
__PK_IDX_VTABLE REDBLACK ID

results matching ""

    No results matching ""