GIS ObjectLand. User Manual
previouscontentsnext / Windows / External databases / Wizard of adding EDB table based on a view of an external source

Page “Defining foreign keys”

Purpose

This page of the wizard of adding an EDB base table serves for defining foreign keys of the table being created. Such keys are used by the data source server for joining tables and for setting reference tables in a query.

Panes

Foreign keys

Contains a list of the table's foreign keys. Following properties are displayed for each key:

Constraint name – name of the key. According to SQL language rules, each foreign key should have a name. If the user does not specify any name for a foreign key being created, then the system generates a name automatically.

Owner – contains name of the owner of that table which is to be joined using this foreign key (the external table), if the data source of the EDB supports the concept of data owner.

Table – contains name of the external table.

There are two buttons in the pane:

Add – activates the properties' pane to add a new foreign key of the table;

Delete – deletes the foreign key selected in the list.

Foreign key properties

Field Constraint name allows specifying a name for the table's foreign key. This name can be used later for manual composing SQL expressions for processing the table.

Pane Foreign table contains fields which allows selecting in appropriate lists name of a table to join with which this foreign key will be used (an external table), and name of this table's owner (if the EDB's data source supports the concept of data owner).

Correspondence of columns – a list containing pairs consisting of a column of the table being created (a column of key) and a column of the external table compatible with the column of key by data type. When joining the tables, correspondence of their records is set on the basis of matching of values of all pairs of columns in the foreign key.

Fields located below the Correspondence of columns list, allows selecting a pair of matching columns in the lists of columns of the table being created and of the external one.

Buttons Up and Down allows changing order of column pairs in the foreign key.

Button Delete deletes the selected pair of columns from the pane Correspondence of columns.

Button Add allows selecting a new pair of columns for including into the foreign key.

Button Save transfers values of fields of the key properties pane to a selected row of the foreign keys list.

See also

Adding EDB table as a base table in data source

previoustopnext