MySQL Import/Export

MySQL Import/Export - Import/export for MySQL databases

Synopsis
export mysql [options] schema; import mysql [options] schema;

Description
The import and export functions are supported for MySQL databases. The export directive saves the current model to the MySQL database named schema. The import directive loads a model from the MySQL database named schema.

The module global table_prefix can be used to stored multiple models in the same database. The default table_prefix is an empty string.

Data Dictionary
The following tables are used by the import/export proceduce in the mysql module:

Modules
The modules table lists the module in use and their corresponding version information.

Classes
The classes table lists all the classes and properties defined (including those not in use). Runtime classes and properties are listed with a NULL module name.

Properties
Some properties have extended specifications that are not captured by a simple read of the value. These specifications are stored in the properties table.

Transforms
Schedule transformation use the schedule name as the source. A direct transformation uses the object name and property in the form class:id.property. The target is always specified in the form class:id.property.

The specification for the linear transformation uses the form *scale+offset. An external function uses the form

y=function(x1,x2,...,xn)

where x1, x2, ..., xn and y are all specified in the form

class:id.property

Schedules
Schedules are recorded in the original input form which there were defined. See schedule for details.

Class tables
Class tables are created with the naming convention module_class, with the exception of runtime classes, which are named _class. The fields in the class tables will depend on the properties defined in the classes. There is always an id</tt> field that is a key into the objects</tt> table. All other fields are of type text</tt>.

The data recorded in properties fields is always formatted as text. Double and complex values with units will include the units. Complex values may be formatted in various ways depending on the convention, e.g., real/imaginary or magnitude/angle. Timestamps include the timezone.

Caveats
Special data types that are implicitly double (e.g., randomvar, loadshape) will always save as double. The original specification for the data type is not stored and only the realization of the value is stored. The implies that round-robin export-import may not always yield exactly the same model as the original GLM file. However, import may contain the full specification and will be interpreted accordingly.

History
The MysQL Import/Export capability was developed under [/950 Ticket 950].