4.3. Database connections and operations¶
The Database tab of the operations window shown in the figure below allows a user to manage and establish database connections and to execute database operations.
In order to connect to an instance of the 3D City Database, valid connection parameters must be entered in the above dialog. Mandatory database connection details comprise the username and password of the database user, the type of the database, the server name (network name or IP address) and port number (default: 5432 for PostgreSQL; 1521 for Oracle) of the database server, and the database name (when using Oracle, enter the database SID or service name here). For convenience, a user can choose to save the password in the config file of the Importer/Exporter. Please be aware that the password is stored as plain text.
The optional schema parameter lets you define the database schema you want to connect to. Leave it empty to connect to the default schema. The Query button lets you retrieve a list of available schemas from the database. More information on how to work with multiple 3DCityDB schemas can be found in Section 3.4.
For Oracle databases, you can additionally choose to connect to a specific workspace in case the database is version-enabled. All operations of the Importer/Exporter will be executed against this workspace. Please provide the name of the workspace and an optional timestamp. If no workspace is specified, the default LIVE workspace is chosen by default. Again, use the Query button to get a list of available workspaces in the database.
If you need assistance, ask your database administrator for connection details, schemas and workspaces.
To manage more than one database connection, connection details are assigned a short description text. The drop-down list at the top of the Database tab allows a user to switch between connections based on their description. By using the Apply, New, Copy and Delete buttons, edits to the parameters of the currently selected connection can be saved, a new connection with empty connections details can be created, and existing connections can be copied or deleted from the list.
The Connect / Disconnect button lets a user connect to / disconnect from a 3D City Database instance based on the provided connection details.
With this version of the Importer/Exporter, you will be able to connect to versions 4.4 to 3.0 instances of the 3D City Database but not to any previous or later version. See Section 1.4 for a guide on how to migrate a version 2 and 3 instances of the 3D City Database to the latest version 4.4.
The console window logs all messages that occur during the connection attempt. In case a connection could not be established, error messages are displayed that help to identify the cause of the connection problem. Otherwise, the console window contains information about the connected 3D City Database instance like those shown in Fig. 4.3. This information comprises the version of the 3D City Database, the name and version of the underlying database system, the connection string, the schema name, the spatial reference system ID (SRID) as well as its name and GML encoding (as specified during the setup of the 3D City Database).
This information can be requested from a connected 3D City Database at any time using the Info button on the Database tab. Upon successful connection, the description of the active connection is moreover displayed in the title bar of the application window.
Executing database operations
After having established a connection to an instance of the 3D City Database, the Database tab (cf.  in Fig. 4.2) offers the following database operations as separate tabs below the database connection details: