How can I proof if data are consistent in Master-/Detail table relation (in an Oracle database)?

Discussion created by Andreas_Sprosec_7439 on Nov 15, 2016
Latest reply on Nov 15, 2016 by Andreas_Sprosec_7439


The data model of the automation engine database includes some foreign key constraints.
A foreign key (FK) is a column or combination of columns that is used to establish and enforce a link between the data in two tables. You can create a foreign key by defining a FOREIGN KEY constraint when you create or modify a table.
In a foreign key reference, a link is created between two tables when the column or columns that hold the primary key value for one table are referenced by the column or columns in another table. This column becomes a foreign key in the second table.
Sometime it is necessary to disable a constraint on a table (e.g. for testing purposes).
But it could happen that people forget to enable the constraint again.
Therefore it is good to know if the database is in a consistent state that means that no records are existing in a child table without any parent record.