GIS ObjectLand. User Manual
previouscontentsnext / Copying of GDB components / Chapter 51. Copying, moving and merging a table and a query

Setting the operation

Setting operations of copying and moving tables and also of copying queries consists in specifying a mode of processing of each table or query participating in the operation.

At the wizard page “Copying setting” (figure 51-2) a list of all tables or queries chosen as the source of operation is displayed.

Figure 51-2. Page of copying wizard “Copying settings”

Figure 51-2. Page of copying wizard “Copying settings”

The context menu of the pane of components contains the following items (depending on selected operation): Copy (Move), Do not Copy (Do not Move) and Rename. All these items are applied to the tables or queries selected in the pane and serve for specifying the required processing mode.

The situation when for some source components there are destination components with same name and type, is called conflict of names. In particular, the conflict of names will always occur when a table or query is copied into the current GDB.

For a table, the default processing mode is Copy (Move), however, if there is a conflict of names, default mode can not be set, and in this case Undefined will be displayed in the column “Mode”. In this case the menu item Copy is equivalent to the item Rename, because copying is possible only under the condition of renaming the table.

The item Do not Copy (Do not Move) permits the user not to process the selected table.

The item Rename permits specifying the corresponding operation for the table (copying or moving) with simultaneous renaming in the destination GDB. When selecting this item, the dialog box “Rename” is opened (figure 51-3).

Figure 51-3. Dialog box ”Rename”

Figure 51-3. Dialog box ”Rename”

In the field “Name in source GDB” the name of the component whish is to be renamed. In the field “Name in destination GDB” the new name for this component in the destination GDB should be entered. In the pane “Components of destination GDB” all components of the same type which already exist in the destination are listed as a reference. These are names which are already used and therefore can not be chosen for renaming. The OK button is active only if the entered name does not coincide with name of any existing component of destination.

The mode Rename can be used both when there is a conflict of names for the table being copied and when there if no conflict. The name of the table in destination GDB will be indicated in the column “Name in destination” of the components pane.

For the operation of merging tables, setting begins at the master's page “Select destination” (figure 51-1).

The group of radio buttons “If unique values are equal” allows the user to choose a mode of conflict handling when a record of the source table contain in one of its fields a value which coincides with the value of the corresponding field of the destination table, and the destination field has the attribute “Unique”.

In this case, one of the following variants can be chosen:

The next page of the wizard for the operation of merging is “Setting correspondence of fields” (figure 51-4).

Figure 51-4. Page of copying wizard “Setting correspondence of fields”

Figure 51-4. Page of copying wizard “Setting correspondence of fields”

At this page the user should determine in which fields of the destination table are the values of source table's fields to be placed when adding or replacing records.

The column “Reference” contains “+” if a query is the source of merging and for this field of the query a reference table is used.

The system tries firstly to set correspondence between source and destination fialds automatically. Fields are considered to be corresponding if they have the same names and their types are compatible.

Compatibility of types for fields of GDB tables means simply their coincidence. Correspondence of an integer source field to a real destination field is also allowed, but not vice versa. In the case when a table or a query of an external database acts as the source or the destination of an operation, the compatibility of types is determined as it is shown ih the table 43-1.

At the figure 51-4 one can see that for merged tables “Building Certificates” and “List of Building Certificates” the correspondence is set only for two fields: “Number of Storeys” and “ Total Inhabitants”.

The user can correct the setting of correspondence manually using the context menu for the selected field.

The Reset button cancels previously set correspondence for all source fields, and the Automatch button redo automatic setting correspondence for fields with coinciding names and compatible types. However, if the box Taking into account uniqueness and NOT NULL is checked, then an additional condition of coinciding attributes “Unique” and “Not empty” is necessary for setting correspondence of fields.

The condition of coincidence of attributes is not necessary for setting fields. In some cases, when properties of corresponding source and destination fields are similar but not identical, copying of records is possible, but problems can arise for several records. The system warns the user about possible problems which are concerned with incomplete matching of fields. The list of warning messages is shown in the table 51-1.

Warning text

Explanation

Possible consequences

Cannot put NULL value of field in destination because the field declared as NOT NULL

A destination field having “Not empty” attribute corresponds to a source field without such attribute.

Source records with empty value of the field will not be copied.

Violation of uniqueness for field in destination

A destination field having “Unique” attribute corresponds to a source field without such attribute.

The conflict will be handled in accordance with the mode chosen at the wizard page “Select destination” (figure 51-1).

Data truncation

A string field of limited length of an EDB destination table corresponds to a longer string field of an EDB source table (or to a string field of an internal ObjectLand table having practically unlimited length).

Values of this field in source records will be truncated to the destination field length.

Value overflow

A numeric field of an EDB destination table corresponds to a numeric source field having greater range of values.

Source records which does not fit into the destination field will not be copied.

Loss of accuracy

A decimal field of an EDB destination table corresponds to a decimal source field having more digits in fractional part.

Values of this field in source records will be rounded to the accuracy of the destination field.

Table 51-1. Warnings about possible problems when merging fields

previoustopnext