Viz Mosart Administrator Guide

Version 3.9 | Published November 04, 2019 ©

Introduction and Notations

By default Mosart organizes all templates in a single file, c:\ChannelTemplates\channeltemplates.xml. The template database makes it possible to store the templates in a MySql database. The main benefits for this is follows:

  1. To share templates among Mosart installations / galleries

  2. To provide synchronized template sets between 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 will be 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 consisting 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 the prefix helps identifying 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 …_recno (with … representing the prefix, except the _) representing an Primary key, and thereby as value of foreign keys, where applicable.

Foreign keys

A foreign key (referencing a …_recno column of some table) will usually have the name …_…_recno (with the two …s representing the prefixes, still except the _, of the containing and referenced tables, respectively). (In the case that one table has more than one foreign key to the same table, other names will have to be invented.)

Data types

The following data types are used in this specification:

Type

Comment

datetime

Data type capable of storing a point in time (date and time of day)

varchar(n)

Variable length string

integer

General integer

smallint

Small integer, normally used to store boolean values (0=false, 1=true)

longtext

Data type capable of storing a Unicode string of virtually any length

Fixed columns

Every table shall contain the following four fixed columns to store update and insert information for the individual rows. Note that these columns will not be stated in the forthcoming table descriptions.

Name

Type

Allow Null

Description

<prefix>_inserteddate

datetime

No

The point in time at which the row was inserted

<prefix>_insertedby

varchar(32)

No

Mosart server responsible for the insert. Given by AvAutomation TemplateDbDefaultInserter property

<prefix>_updateddate

datetime

No

The point in time at which the row was last updated (or inserted)

<prefix>_updatedby

varchar(32)

No

Mosart server responsible for the insert. Given by AvAutomation TemplateDbDefaultInserter property