|
<< Click to Display Table of Contents >> Referential Integrity KEYVIOL |
![]() ![]()
|
When creating Referential Integrity between a Parent table and a selected Child table, records in the Child table where the linked field values do not match the linked field values of the Parent table will be considered as Child table orphaned records.
When creating a Referential Integrity relation, these orphaned records will be deleted form the Child relation table and saved in a key violation table named KEYVIOL.db or KEYVIOLn.db (KEYVIOL1.db, KEYVIOL2.db, etc.) structured equivalent to the Child relation table.
So, when creating a Referential Integrity between two tables, do look for possible creation of KEYVIOL tables of the same date and time as of the Child table.
If you want to prepare against deletion of such orphaned records, you may want to identify such Child table records before creating the Referential Integrity relation, by executing an SQL Select like this:
SELECT |
or for the DBDemos Employee to Orders relation:
SELECT |