[AccessD] Cascade-delete (was: Estimating Help)

Andy Lacey andy at minstersystems.co.uk
Sun Feb 2 07:52:00 CST 2003


I agree Gustav. I don't allow users direct access to the BE, or even to
queries. Perhaps I'm lucky to be able to enforce that but I've never had
any user who was interested in doing so, or prepared to take the
responsibility. So, ok, my users can only do what I allow them to do
with the FE, and one thing I don't allow them to do is delete vital
records. There are Active/Inactive flags and Status fields they can set
but they cannot delete such a thing as a customer. Records of a more
transitory nature which have been deemed by all to be of no interest
historically (like your log file example) may get deleted by the FE, and
there I use Cascade Delete. I am dictating the deletion and I fail to
see why I shouldn't let Cascade Delete take any child records out for me
rather than using queries.

Andy Lacey
http://www.minstersystems.co.uk



> -----Original Message-----
> From: accessd-admin at databaseadvisors.com 
> [mailto:accessd-admin at databaseadvisors.com] On Behalf Of Gustav Brock
> Sent: 02 February 2003 12:36
> To: John W. Colby
> Subject: Re: [AccessD] Cascade-delete (was: Estimating Help)
> 
> 
> Hi John
> 
> >>I guess your intention is to warn the less experienced 
> developer from 
> >>applying RI with cascade-delete set to on. This warning is right -
> 
> > Correct, that is my intention.  Actually the point is that 
> RI is set 
> > up by default with cascade delete off.  LEAVE IT (cascade 
> delete) OFF!  
> > If you need to delete things, do it with queries and transactions.
> 
> > I will admit to turning cascade delete on as an administrator, 
> > deleting all the data for a specific massive set of records in 20 
> > related tables, then turning cascade delete back off.  I could have 
> > done it with queries, but I am the DBA and I know what I am doing.
> 
> > Using cascade delete as a tool to allow users to delete records is 
> > risky. You may be able to find specific instances where it works 
> > without any risks, but as a rule - "ya shouldn't be doin' that".
> 
> OK, I think we are narrowing this in now to my initial point 
> - as a comment to Arthur who seems to abandon cascade-delete totally.
> 
> I know you love your Trash flag to prevent to physically 
> delete records; other use timestamps but the principle is the 
> same. And those records may have valuable child records like 
> order statistics etc. With the lower price on disk space and 
> faster servers and workstations it has become easier to stick 
> to this non-delete principle. In those cases cascade-delete 
> is turned off for those tables.
> 
> What I am talking about is strictly child records of no value 
> without their parent record. We are now talking about 
> clean-up which is another situation than erasing information. 
> I can think of examples like child tables with properties 
> useless without the parent record, linking tables (some only 
> hold pairs of keys from two tables), and log tables with 
> various information in child tables. In those cases 
> cascade-delete can safely be turned on for those tables. 
> 
> /gustav
> 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/a> ccessd
> Website: 
> http://www.databaseadvisors.com
> 
> 




More information about the AccessD mailing list