User Tools

Site Tools


Table of Contents

Join Database

Documentation | Help File | UI | 2D Mode | Menu | Data | Join Database

Clicking on the Data/Join Database menu item allows to temporarily attach a database table to the attribute table of a vector layer. The Editor sets up a persistent linkage to a database, without importing the table into the layer. When the connection has established the columns from the database are displayed in the Data panel along with the layer attributes. The attributes stored in the database are easily distinguishable by the db. prefix in the column names. The database columns cannot be edited from the Editor, but they are dynamically updated whenever the values are changed within the database.

To attach a database table to the attribute table of a vector layer

  1. Activate (highlight) the desired layer. Do this by clicking on its name in the Legend.
  2. Click on the Data/Join Database menu item - this invokes the Join Database dialog box.
  3. Within the Join Database dialog box, enter the connection string in the Connection string field or click on the Build… button to use an automated method. Clicking on the Build… button invokes the Connection string dialog box. If a file with connection parameters is available check the Use data link file option, click on the Browse… button and point to the file. Otherwise check the Use connection string option, click on the Build… button and use the Data link properties dialog box define the connection according to the configuration of your database. Finally, click on the OK button to close the Connection string dialog box.
  4. If the settings are correct a connection with the database is established and the Join Database dialog box is filled with information about available database tables.
  5. Pick a database table from the Table list - this table will be attached to the attribute table.
  6. Pick a column from the Order by list - this column will be used to sort the records of the table.
  7. If necessary, modify the SQL query in the SQL query field.
  8. [OPTIONAL] Click on the Preview button - this causes refresh of the Data preview field which presents the database content selected by the SQL query.
  9. In the Assign by box use the Layer attribute and the Database column lists to define how the records from the database should be assigned to the shapes.
  10. Click on the Join button - the selected database content will be attached to the attribute table of the layer.

Join Database dialog box with sample connection set up.

Connection String dialog box.

Data Link Properties dialog box.

Similar functions

  • To import attribute tables from a database or data file, use the Import data feature.
  • To add a layer stored in a database, use the Add from server feature.


  • The user can always go back to the previous settings by clicking on the « Previous button.
2018/05/22 15:18

Page Tools