Re: On delete cascade

From: Wilfred van der Deijl <W.van.der.Deijl_at_inter.nl.net>
Date: 1996/03/25
Message-ID: <DouHtx.MIJ_at_solair1.inter.NL.net>#1/1


Sakari Lampola <Sakari.Lampola_at_cybersoft.inet.fi> wrote:

>Has anybody ever used "on delete cascade" option with foreign keys
>to guard referential integrity in a real production database ?
>Any problems ?

In our production system (and development and test systems) alle the tables have two date-fields to indicate the period in which a row is valid. This is used because all the data is date-depended. For example the table EMPLOYEE has a hire_date and fire_date.

This way you can also look up data on fired personal which would not be possible if you delete the employee.

Because deleting is very rare in our tables we have CASCADE DELETES on ALL foreign keys. Deleting a row is not possible using the client-software but if we decide to use SQL*Plus to delete a row we sure want to cascade the delete, because using a delete in our system indicates that the row shouldn't have been included in the database at all. If such a rare situation occours we sure want all depended data to delete also. Received on Mon Mar 25 1996 - 00:00:00 CET

Original text of this message