How to work with point databases

The work with databases consists of the basic steps below:

Connection to the database

Before working with any points or graphics in the database, it is necessary to connect via the ODBC drivers to the database. All the connection parameters are set in the configuration file; from a keyboard while connecting, only the login name and password are entered. After calling the command Database->Connection to the database to database, a dialog window is displayed with the list of all the available connections pre-set in the configuration file. After login in, you have to select a setting (database profile) and enter the login name and password. After confirming the entered data, the GROMA system will try to connect to the database. If the connection fails (wrong name or password, wrong parameters), the pertinent ODBC driver will display an error message. No message will be displayed if the connection was successful.

The GROMA system can be connected to only one database at a time. If you want to work with a different database, you have to disconnect from the previous database.

Database initialization

Before working with the drawing database, you first have to create the database structure, i.e. all the tables and relations necessary to store the drawing and projects in the database. This function serves this purpose.

This initialization only has to be performed when working with the graphic module of the GROMA system. If you only use the point tables, you can initialize them manually as needed.

Selection / setting of the active project

All the elements (coordinate list points and graphic elements) are stored in a common table. The individual projects or other data groups are distinguished by their pertinence to a certain project. Therefore, you have to define the project before the actual work with a database.

The dialog window for the project definition is displayed after entering the command Database->Project settings. In the left part of the window is the projects list; in the right part the setting of the relevant project.

Creating a new project

You can create a new empty project by pressing the button (New). Pressing the button deletes all the settings from the previous project in the right part of the window. You can store the new project after entering the new settings by pressing the button (Save).

If you want to create a new project based on the already existing project, you can press the button (New) press the button (Copy)instead of the button (Save). In this way, all the settings from the previous project will remain in the dialog window (besides the ID). After the adjustment, press the button (Save) and the new project will be saved.

Adjustment of an already existing project

If you want to change some of the project settings, select the project from the list, make the necessary changes, and save the adjusted project by pressing the button (Save).

Project selection

After selecting a project you want to work with press the button (OK). The project has been selected and all the further operations will be applied only to this project.

Removing a project

Redundant projects can be removed by pressing the button (Remove). First, you must ensure that no data related to the removed project remained in the database. The control of this can be ensured by the settings on the database level (e.g. using foreign keys - see the documentation of the pertinent database).

Warning

Only one user can work on a project at one time-multiple users could damage the data.

Selecting an active table

The GROMA system allows working with several tables within one database. This can be used e.g. when creating geometric plans, when the points you want to display in the graphic when drawing the plan can be saved in one table, and in another table the points which shall be listed on the coordinate list on the geometry plan can be saved. You can find the details on the technology of the creation of a geometric plan and on tables in the graphic module manual.

Import from database

Using this command you can import the coordinates of all or selected points related to the selected project into GROMA.

After entering the command, a dialog window is displayed where you can enter the criteria for selecting the points. If you leave the window empty, all the points from the selected project will be imported.

After the import, the points are displayed as a standard coordinate list. The connection with a database is symbolized by a database symbol at the left edge of the window by each point connected to the database:

  • The point is connected with the database and unchanged.
    The symbol is white when the displayed point corresponds to the stage in the database

  • The point connected with the database has been changed
    The symbol is red when the point is modified in the GROMA system and it is no longer identical to the stage in the database.

The changes performed in the coordinate list are not automatically reflected in the database. After the adjustments to the coordinate list, it is necessary to manually enter the command Coordinates->Remove deleted points from database to save the changes in the database, and eventually Coordinates - Remove deleted points form database to remove the deleted points form the database.

The connection of the points to a database is cancelled by closing the coordinate list. The points will remain on the list, but they will not be connected to the database after reopening the list, so you won't be able to save the changes to the database. The connection with the database can be renewed only by a new import from the database.