Checking for Dependent Elements (Check Flags)

Entering check values into the check flags of a relation has the effect that DataView checks the number of dependent master elements if the user wants to delete a selected parent- or child record in one of the connected tables. If the record to be deleted has dependent master elements, DataView will only allow the delete operation if the number of dependent records is smaller than the check value entered in the check flag. If this is the case, the selected parent- or child record can be deleted by the user.

For the different relations the following check flags exist:

> Ch
For relation: When deleting master records in entity 1 it checks the number of dependent master records in entity 2.

For link: When deleting master records in table 1 it checks the number of dependent master records in table 2.

For type relation: When deleting master records in entity it checks the number of type records in corresponding type table

< Ch
For relation: When deleting master records in entity 2 it checks the number of dependent master records in entity 1.

For link: When deleting master records in table 2 it checks the number of dependent master records in table 1.

For type relations there is no such check flag

Depending on the relation the entries in the check flags have the following effects:

Relation Check Flag Entry Automatic operation for dependent element
Relation
from entity 1
to entity 2
User wants to delete parent record in master table of entity 1
> Ch 0 Deleting always allowed
n Deleting only allowed if number of dependent child records in master table of entity 2 is smaller than n
User wants to delete parent record in master table of entity 2
< Ch 0 Deleting always allowed
n Deleting only allowed if number of dependent child records in master table of entity 1 is smaller than n
Link from table 1
to table 2
User wants to delete parent record in table 1
> Ch 0 Deleting always allowed
n Deleting only allowed if number of dependent child records in table 2 is smaller than n
User wants to delete parent record in table 2
< Ch 0 Deleting always allowed
n Deleting only allowed if number of dependent child records in table 1 is smaller than n
Type relation from entity to type table
(Also for relation to zero-entity, then from entity to relation table)
User wants to delete master record in entity
> Ch 0 Deleting always allowed
n Deleting only allowed if number of dependent type records in corresponding type table is smaller than n
(for relation to zero-entity: ... if number of dependent relation records in relation table is smaller than n)

Please note that the check flag procedure is functionally connected with the standard procedure for securing referential integrity without any user activities required. If deleting master tables is allowed, DataView will automatically delete the connected relation- or type records.

Example: In the meditronic application a user is to be only allowed an item from the item master if the item is provided by less than three suppliers. This is defined by the check flag entry >Ch = 3 in the refine relation Item-Supplier. As displayed in the figure DataView will check the number of suppliers. For there are only two of them, the item can be deleted. The standard procedure for securing referential integrity will then automatically delete the relation records which are no longer needed.