Tables and queries participate in the operation of merging maps if the variant Whole is selected.
When selecting the line “Tables and queries” in the pane of component types, a tree including the following components is displayed in the pane of components:
a list with names of source GDB tables linked with feature types of source map layers and used as references in queries built on the basis of these tables;
a list with names of all cataloged queries built on the basis of tables linked with feature types in layers of source map;
lists with names of tables and queries belonging to external databases which are contained in the source GDB and are linked with feature types of the source or are used as references.
Let us note that names of tables and queries linked only with layers of source map for which the processing mode Do not Copy is set as well as names of queries built on the basis of tables for which the processing mode Do not Copy is set will be present in the components pane. However, these tables and queries will not be copied not depending on processing modes specified for them.
If a table is selected in the pane of components then the context menu contains the following items: Default; Copy; Rename; Merge; Merge, Unique from Source; Merge, Unique from Destination; Update; Shared Use and Do not Copy. All these items are applied to the table selected in the pane and serve for specifying the required processing mode. The last menu item Settings plays a special part. This point becomes active after any of processing modes Merge; Merge, Unique from Source; Merge, Unique from Destination or Update is selected for the given table.
The item Default permits specifying default processing mode for selected table: Copy or Shared using. When there is a conflict of names, default processing mode cannot be specified, in this case Undefined will be displayed in the column “Mode”.
If the source and destination GDB are the same, Shared use is default processing mode. That is, a copy of selected table is not created, and links of types in the copied layers of destination map with the table and links of copied features with table records for the destination map will remain the same as for the source map.
When the source and destination GDB are different and there is no conflict of names, Copy is default processing mode – copying the table from the source GDB to destination GDB under the same name.
The item Rename permits copying a table in destination GDB under another name. When selecting this item, the system will request a new name for the table being copied. This processing mode should be used if there is a conflict of names for the table being copied. The name of the destination table will be indicated in the column “Name in destination GDB” in the pane of components.
The items Merge; Merge, Unique from Source; Merge, Unique from Destination or Update allow specifying a processing mode for selected table in which records of the source table will be copied to the indicated table of destination GDB (destination table). The term merging modes will stand further for any of these processing modes.
When selecting any of the merging modes, the system will request the user to select the destination table with which the source table will be merged (figure 52-3). The name of the destination table will be indicated in the column “Name in destination GDB” in the pane of components.
Figure 52-3. Dialog box “Select component for merging”
After selecting a destination table, correspondence between columns of source and destination tables should be set, as was described in chapter 51 “Copying, moving and merging a table and a query”, subsection “Setting the operation”. The dialog box “Setting correspondence of fields” (see figure 51-4) is opened automatically after selecting any of merging modes. It can be also invoked via menu command Settings if the user wants to change the previously set correspondence of columns.
When merging the two tables, a situation can occur when one of fields of a record of the source table has the same value as the corresponding field of some record of the destination table, and the destination field has the attribute “Unique”. It is evident that the merged table can not have two records with equal values of an unique field. Such a situation is referred to as conflict of uniqueness, and this conflict should be resolved in one or another way. An additional complication is related with the fact that conflicting records can be linked with graphic features of the maps being merged, and when resolving the conflict the way of handling such links should also be defined.
The merging modes listed above differ in the way of resolving the conflict of uniqueness.
Merge – in the case of conflict, the record of the source table is not copied, and links of features with this record are lost.
Merge, Unique from Source – the record of the source table replaces the conflicting record of the destination table. Links of features with the source record are retained, links with the destination record are transferred to the replacing source record.
Merge, Unique from Destination – the record of the source table is not copied, but links of features with this record are transferred to the conflicting destination record. Links with the destination record are retained.
Update – only those records of the source table which conflicts with records of the destination table are copied. In other words, updating of others (not unique) fields of the destination records by values of corresponding fields of the source record takes place. All links with features are transferred to the updated record.
It should be noted that fine tuning of copying the links is performed when the line “Links” is selected in the pane of component types (see subsection “Setting of copying links”).
When merging tables it may occur that a record of the source table cannot be added to the destination table:
some record field of the source table has an empty value, and the corresponding field in the destination table has the attribute “Not empty”;
some field of the destination table has the attribute “Unique”, and the record of the source table has the value in the corresponding field which coincides with the value of this field of some record of the destination table.
In such situations the record of the source table is not copied.
The item Do not Copy allows the user not to copy selected table. In this case queries built on the basis of the table; tables used as references in these queries, type links in map layers with the tables and links between features and table records will also not be copied not depending on selected processing modes.