[Net 2000 Ltd. Home][DataBee Home][DataBee Manual][DataBee FAQ]

The DataBee
Create/Edit Foreign Key Manager Rule Form

The DataBee Create/Edit Foreign Key Manager Rule Form

When loading target subset databases with extracted data, the foreign keys must be disabled prior to the load and re-enabled again upon completion. This is necessary because, while the DataBee software guarantees that a referentially correct collection of data rows will be present in the target tables, it cannot load the data in such an order so as to be continuously referentially correct during the actual load process. It would be very slow and practically impossible to ensure that all foreign key relationships where continuously valid during the load process. Consequently any foreign keys present in the target schema must be disabled while the data is being copied from the source schema to the target.

The Create/Edit Foreign Key Manager Rule form is used to create and edit DataBee Foreign Key Manager rules. Foreign Key Manager rules are designed to manage the process of the enabling or disabling of the schema foreign keys. A Foreign Key Manager can be created in one of two modes: disable foreign keys or enable foreign keys. The mode is chosen when the rule is created and cannot be subsequently changed. The title text and button labels on the form will change as is appropriate to the enable/disable mode and also if the rule is being newly created or edited. In the example screen shot above, the form is editing an existing Disable Foreign Key Manager rule.

Foreign Key Manager rules are only present in loader sets and a matching pair of disable and enable rules are usually created automatically by the Set Designer application when a new loader set is created. Foreign Key Manager rules can be created manually, if required, using the options on the New Loader Rule form.

A Foreign Key Manager rule is provided with the foreign keys known to its Rule Controller when the rule is created. To refresh the list of foreign keys known to the Foreign Key Manager rule, first refresh the foreign keys in the Rule Controller using the Refresh Foreign Keys button on Options tab of the edit Rule Controller form. This retrieves an up-to-date list of foreign keys from the target schema. Once the Rule Controller has been updated, use the Refresh Foreign Key List button to refresh the list inside the Foreign Key Manager rule. If required, the checked or unchecked state of the foreign keys can be saved and then restored after the refresh using the Export Current Configuration and Import Current Configuration buttons.

The Number of Foreign Key Operations Permitted to Fail field configures the Foreign Key Manager to ignore a certain number (or all) of the errors received while processing the foreign key operations. This enables the Foreign Key Manager to continue operating even if errors occur. Be aware that ignoring the errors in the Foreign Key Manager just permits the Foreign Key Manager to complete as many operations as possible before returning an error and stopping the execution of the masking set. In other words, even if errors are ignored, any errors which occur during the foreign key disable/enable operations will mark the Foreign Key Manager rule as having failed and the error state will be reported to the DataBee software for handling once the actions have completed.

Important Note: Remember that the DataBee software is multi-threaded and that properly configured Rule Blocks are required to ensure the Foreign Key Manager rule runs in the appropriate order. Usually a disable mode Foreign Key Manager rule is configured with a rule block that runs it as the very first rule in the loader set and a second Foreign Key Manager rule is configured to run in enable mode as the very last rule.

Existing Foreign Key Manager rules can be edited by double clicking on them with the mouse. Foreign Key Manager rules are created by launching the New Foreign Key Manager form using the New Rule button located on the lower right hand corner of the main form in the Set Designer application.

How to Create a New Foreign Key Manager Rule


[Net 2000 Ltd. Home][DataBee Home][DataBee Manual][DataBee FAQ]