2010 Jan 13 2:28 PM
Hi,
When we have a master table which also acts as a check table for the foreign keys of other dependant tables.
If we delete an entry from the check table which already resides in the foeign key table as reference, data integral inconsistency is introduced.
Eg, If the airline booking tale contains a foreign key to airline master table CONNID.
In airline booking table, lot of entries for the airline 'LH' exists which refers to the airline master for 'LH' airline.
Now if we directly delete the entry 'LH' from the airline master, all the entries referring to 'LH' in booking table becomes inconsistent.
Could you please suggest how to avoid this?? Do we have some config in the table(DDIC) which could avoid this.
Thanks
Hi,
When we have a master table which also acts as a check table for the foreign keys of other dependant tables.
If we delete an entry from the check table which already resides in the foeign key table as reference, data integral inconsistency is introduced.
Eg, If the airline booking tale contains a foreign key to airline master table CONNID.
In airline booking table, lot of entries for the airline 'LH' exists which refers to the airline master for 'LH' airline.
Now if we directly delete the entry 'LH' from the airline master, all the entries referring to 'LH' in booking table becomes inconsistent.
Could you please suggest how to avoid this?? Do we have some config in the table(DDIC) which could avoid this.
Thanks
2010 Jan 13 2:31 PM
This could be handled properly by creating view cluster.
Generate a manitenance view , join the tables, set the secondary tables as subset to the primary table.
The keys must be properly related.