By default, Viz Mosart organizes all templates in a single file, C:\channeltemplates\ChannelTemplates.xml.
The Template Database enables storing of templates in a MySQL database.
The main benefits are the ability to:
Share templates between Mosart installations and galleries.
Provide synchronized template sets between the Mosart main and backup servers.
Viz Mosart Template database tables
Table name | Prefix | Short description |
|---|---|---|
db_database | db | Mosart Template Database update table. Contains an overview of database update. |
em_enumerationmember | em | The enumeration members that may be used as values for template fields of enumeration type. |
en_enumeration | en | The enumerations that may be used as types (i.e. sets of admissible values) for template fields. |
fi_field | fi | The fields used as template inputs. |
ga_gallery | ga | The galleries. |
lo_lock | lo | Contains locks for editing database content. |
sq_sequence | sq | Contains sequences stored as part of the Mosart template sets. |
ta_templatetypealias | ta | The template type aliases (a template type may be referred to by several aliases). |
td_templatedescription | td | The template descriptions. Input fields and transition input fields. A template may have different descriptions for different galleries. |
tdfi_connection | tdfi | Relation, relating template description and fields. |
te_template | te | The templates. |
ti_templateimplementation | ti | The template implementations. A template may have different implementations for different galleries. |
tr_transition | tr | Available transitions to be applied between templates. |
ts_templateset | ts | The template sets (the templates are organized in sets). |
tsp_templatesetproperties | tsp | Template set properties |
tt_templatetype | tt | The Mosart template types. |
Conventions and Notations
Table Prefix
Each table has a unique prefix made by abbreviating the rest of the table name, followed by an underscore (_). This prefix is used both in the table name and for all columns in the table.
Using a prefix helps in identifying the relationships between column names and tables.
Syntax:
Table | <prefix>_<tableName> | ts_templateset |
|---|---|---|
Column | <prefix>_<columnName> | ts_recno, ts_name |
Foreign key | <prefix>_<foreignColumnName> | ts_ga_recno |
Primary Keys
Each table has an integer column <prefix>_recno representing a Primary key, and thereby as value of foreign keys, where applicable.
Foreign Keys
A foreign key (referencing a <prefix>_recno column of some table) usually has the name …_…_recno (with the two …s representing the prefixes, still except the _, of the containing and referenced tables, respectively).
Info: Where a table has more than one Foreign key to the same table, you will need to create an alternative name.
Data Types
Type | Comment |
|---|---|
datetime | Data type capable of storing a timestamp |
varchar( n ) | Variable length string. |
integer | General integer. |
smallint | Small integer, normally used to store boolean values ( |
longtext | Data type capable of storing a Unicode string of virtually any length. |
Fixed Columns
Every table contains the following four fixed columns to store update and insert information for the individual rows.
Note that these columns are not stated in the accompanying table descriptions.
Name | Type | Allow Null | Description |
|---|---|---|---|
<prefix>_inserteddate | datetime | No | When the row was inserted. |
<prefix>_insertedby | varchar(32) | No | Mosart server that handled the insert. Provided by AV Automation property TemplateDbDefaultInserter. |
<prefix>_updateddate | datetime | No | When the row was last updated/inserted. |