Database

Represents the project's database. This data works both as input and output data.

Each direct child of the Database category under Project Explorer represents a table set, which may contain one or more tables. Tables in a table set have a one-to-many relationship, which makes it possible to automatically produce queries on them or export the whole table set as a hierarchical XML file.

To use a table set as output data, simply run a global that returns a structure. This structure will be used as a model to produce the target tables. If this structure contains nested structures, a table set with many tables will be produced and the parent-child relationships will be preserved. The easiest way to return a structure is by having an extract statement as the last statement of the do-block statement.

Database elements can also be used as input data from within a global by prepending the table set name with the 'Data.' prefix, or by creating a query and using the 'Query.' prefix.

Exporting

Table sets can be exported to Excel or XML. When exporting to Excel, one sheet per table is added to the resulting file. When exporting to XML, the structure of the table set is maintained in the XML file and XML elements are named after column names. An exception to this rule is made when a child table contains a single column called 'value', in addition to the 'id' column. In this case the parent column name is used and no 'value' XML element is added.