John W. Colby
jcolby at colbyconsulting.com
Sat Feb 1 16:14:00 CST 2003
I believe both of us are talking about leaving it turned on for the average user. This is a DBA tool, not an end user tool. Of course I have turned on Cascade delete in order to do cleanup, but I am the administrator (or acting as one). I turn it back off when I am done. My users can click delete to their hearts content. If there is a child record, JET politely informs them to take a flying leap. It is very difficult (without applying Access Security or setting cascade delete off) to prevent users from deleting things. Queries and forms may, even unintentionally, allow a user to delete something. "Power users" are often granted the right (by management) to go in and build queries to do things. If cascade delete is turned on, the risk of an "accidental" delete is pretty high. I would say even with security applied it is pretty high! Of course I also went to a lot of effort to design an active / trash system to back up their lack of "delete" ability. Over the years I can't even count the number of times I simply went in and "undeleted" records that a user had tried to delete. In the end, it doesn't matter whether you use Security or turn off cascade delete, you must prevent the $5 / hour data entry person (and the $60k / year manager) from disemboweling the database by deleting some parent object with a thousand child / grandchild / great-grandchild records. If you are just turning it on by default and not considering the consequences then you should be buying large malpractice insurance policies. JMOOC John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: accessd-admin at databaseadvisors.com [mailto:accessd-admin at databaseadvisors.com]On Behalf Of Stuart McLachlan Sent: Saturday, February 01, 2003 4:54 PM To: Arthur Fuller; accessd at databaseadvisors.com Subject: Re: [AccessD] Estimating Help > I didn't mean that the rows were disappearing, but rather that they > disappeared from reports, since their FK referents were gone. I would never > be so foolish as to turn cascade-delete on anywhere in any serious database > :-) Why "never"? Why do you think it is foolish? Admittedly you need to think hard about it before switching it on, but there are many instances where it is a powerful and useful tool which saves writing a lot of unnecessary code. I can think of many cases where you need to delete all children when a parent is removed. Why re-invent the wheel and risk getting it wrong. -- Lexacorp Ltd http://www.lexacorp.com.pg Information Technology Consultancy, Software Development,System Support. _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com