Chapter 39. File structure for database settings

You can pre-set the parameters of the connection to different databases and, when connecting, simply select one of the pre-set connections from the list. The only data which can't be pre-set and which always has to be entered manually is the login.

The file which contains all the settings is stored in the subdirectory sql of the main directory of GROMA under the name db.ini. The file is in XML (Extensible Markup Language) format. The detailed description of the XML language is beyond scope of this manual. All the information on the XML language can be found on the website of the W3C International Consortium which specializes in standardization on internet (http://www.w3.org/XML/). Detailed skills with XML language are not required for work with GROMA. The installation contains a sample db.ini file which can be adjusted.

When adjusting, the file structure has to be maintained. Especially the condition that all the file elements must be closed correctly must be adhered to. It means that, for each opening mark in the format,

<mark>

must also be, in the correspondent position, the closing mark

</mark>

If the element does not contain any other marks but attributes, it can be closed with a shortcut, i.e. writing the character / directly in the opening mark of the element:

<mark atribut1="data" atribut2="data"/>

The file structure is following:

The definitions of the structure of the database tables are described in the section <structures>. Each definition of the database connection is described in the element <profile>. The element <profile> contains element <server>, in whose attributes are described connections to the server and the element <shema>, where a corresponding database structure is assigned to the connection.

Element structure <column>

Table 39.1. Item's attributes <profile>

Attribute nameDescription
name=Profile name.. This name displays in the GROMA dialog window when connecting to the database. Using this name, you can choose from a list of the pre-set connections.
descrip=Connection description. Here you can enter a detailed description of the connections that will be displayed in the dialog window when connecting.

Table 39.2. Item's structure <profile>

Item nameDescription
<server>This item contains the parameters of the connection to the database server. Item profile must contain exactly one item server. If the item is empty, all the settings are contained in the attributes.
<server>This item contains the description of the database table structure. The profile definition must contain two tables: the project table and the point table.