|
<< Click to Display Table of Contents >> PdxEditor Referential Integrity |
![]() ![]()
|
Though not a fully fledged referential integrity editor, the PdxEditor provides creating any* Paradox referential integrity:

When creating referential integrity relations, you should always build from from left (Parent) to right (Child), and successively shifting the linked Child table into the Parent position to give place for a new downsteam Child relation.
The Cascade/Prohibit option is relevant only for the update/modify behaviour, as with Paradox the delete constraint will always be of the Prohibit mode (i.e. dis-allowing to delete master key values, except if there are no corresponding detail values in the child table).
Taking the DBDemos database as an example, where the tables Orders and Parts may relate as Child tables to the left and Master tables to the right, you should always start creating the relations as follows:
• Customer -> Orders
• Employee -> Orders
before creating
• Orders -> Items
and
• Vendor -> Parts
before creating
• Parts -> Items
Creating of Child (Detail) relation (e.g. on the Orders table) to a Parent (Master) table (e.g. to the Employee table) cannot be created, if the Child table's detail field (e.g. the Orders.EmpNo field) is not empty, or as long as it has a Master relation to another table (e.g. to the Items table in the DBDemos example).
Trying to do so will be met with this error message:

The message ("this master") is referring to the Child table (Orders) acting as a master to the Items table, where "another table" in this case is the Employee table.
As a general rule, the Ref. Int. messages are as viewed from the child table.
Solution: Without clearing any table data, you may delete the .VAL files associated with the related tables (however also clearing other table specific validity checks!), and then building the Referential Integrity relations "downstream from left to right" - for example Customer-Orders and Employee-Orders as well as Vendor-Parts before Orders-Items and Parts-Items.
Please see the DBDemos and it's relations.
*) Though primary keys as well as secondary indexes may include multiple fields, this is dis-recommended for referential integrity relations and thus not supported by PdxEditor.
__________________________