Synchronization of dictionary - D2000 CfgSynchronizeDictionary

Function SynchronizeDictionary is a component of program D2000 CfgSynchro. It is used to copy (synchronize) the contents of dictionary among two databases (or D2000 System applications).

By means of user interface the changed dictionaries can be identified and subsequently, if needed, copied from one configuration database to the other (database synchronization). This tool is suitable for synchronization of databases that were created as a copy of the original configuration database and changes in them have been performed separately.

Comparing dictionaries


In order to synchronize configuration databases every dictionary entry must be paired with its image (counterpart) in the other database. The image must have an identical composite key that identifies it.
A composite key consists of TEXTKEY (a unique key of an entry) and LNG_IDX (language identifier). This pair of information characterizes an entry in a dictionary unequivocally and it is unique.

The above mentioned implies that if there are items with the same key and language identifier in two different configuration databases, they will be considered identical and the synchronization may take place thanks to having identical composite keys. If either of the two parts of a key differ from the keys defined for the other entry the items cannot be considered identical and synchronization cannot be accomplished. A situation may occur that the same language is included in both databases, however, with different identifier. So as to be able to synchronize such databases correctly, the languages have to be paired. If a language cannot be found in the other database it can be easily added to that database.

Coupled entries

In the picture there are coupled entries from two databases according to the composite key. The individual items consist of:


ID Makes the orientation and lucidity to be easier.
Key Key that is common for both databases (left, right).
Language Displays language of the entry.
Left database Item from left database.
Right database Item from right database.

States of objects


Status of objects

1 The entries match in both databases (no synchronization possible).
2 The items are different and can be synchronized.
3 The items are different and they will be updated / inserted according to the orientation of the arrow.
4 One database does not contain the item, which will be therefore removed from the other database as well.

A text displayed in blue is a more current item.
An item in red designates an item with undefined text.
If there is a text (NULL) of black colour, it means that this key was associated with a value as (NULL).
An empty item indicates that no entry for the particular key can be found in the database.


Icons indicating the direction of transfer


Transfer from the left database to the right.
Transfer from the right database to the left.
No change.

Main window


Synchronisation of dictionaries

1 Panel allowing to open databases.
2 Filtering by state.
3 Filtering by language.
4 Filtering by mask.
5 Tools for database synchronization.
6 Pairing of languages.
7 Commit database changes.
8 Displays data.
9 Closes the window.

Opening of databases

The first step is to open databases, which be performed in the panel :

Database opening


1 Database name.
2 Opens database.
3 Closes database

In order to synchronize databases, both of them must be opened.

Filtering of displayed data

Having opened databases, entries of all dictionaries are displayed. To achieve better lucidity and easier manipulation with texts, filters can be used.

Filtering can be accomplished in three ways - according to state, language and mask or as a combination of any of them.

Filter by status

Filter by language

filter by mask

Filtering by state

  • All - displays all entries from database
  • Differences – shows all items that are going to be synchronized
  • Not selected – shows entries that are to be synchronized but the method of synchronization has not yet been determined
  • Selected – displays objects that are to be synchronized with chosen method
  • Selected --> - lists the items containing differences that are going to be synchronized from the left to the right
  • Selected <-- - lists the items containing differences that are going to be synchronized from the right to the left

Filtering by language :

  • * - displays all entries
  • „xxx“ – displays only entries whose LNG_IDX matches the desired pattern - „xxx“

Filtering by mask - only shows objects matching the specified criterion.

 

Database synchronization tools

After selecting individual lines, user is allowed to choose a method of synchronizing. Performing the actual synchronization is triggered by clicking the button .

Having clicked the button above, the changes are stored into database. Up till then, the way of synchronization may be freely changed.

Ways of database synchronization:

  1. Marks the line to edit the right database according to the left one.

  2. Marks the line to edit the left database according to the right one.

  3. Marks the line to be edited according to the time of the last change by replacing old data with new one.

  4. Cancels the synchronization.

  5. Allows to select one of the four options by double-clicking the next to each of them radio button.

Pairing of languages

In order to display corresponding entries properly, the languages have to be correctly coupled. A situation may occur that the same languages are named differently or a language may not even exist in the other database.

For this reason a tool for pairing languages has been developed. It is started automatically after opening both databases or it can be run manually by clicking the button .

The picture above shows the window used for pairing of languages.

ID in section 1 and 2 displays the language ID in database and the column Language shows its name in database.

ID and language items in the window 3 are only informational, they cannot be found in any database, however, after being paired the language name from the section 3 is going to be worked with.

Description of the window:


1 Languages in the left database.
2 Languages in the right database.
3 Paired languages.
4 Moves a selected language in list 1 up /down.
5 Moves a selected language in list 2 up /down.
6 Adds a language from the list 2 into the list 1 or removes a language added from list 1.
7 Adds a language from the list 1 into the list 2 or removes a language added from list 2.
8 Confirms changes and closes the window.

The added languages are saved into databases after closing the window. The languages that have not been paired with any other languages cannot be synchronized.

WARNING :
An improper pairing of languages causes data to be displayed incorrectly and synchronization of such databases may lead to a wrong synchronization operation and errors.

0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .