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

John W. Colby jcolby at colbyconsulting.com
Sun Feb 2 06:10:01 CST 2003


>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".

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 Gustav Brock
Sent: Sunday, February 02, 2003 6:27 AM
To: John W. Colby
Subject: Re: [AccessD] Cascade-delete (was: Estimating Help)


Hi John

> Some of us are just luckier than others I guess.  Never had a user rip the
> guts out of your database by trying to delete a client that they "weren't
> doing business with" at the moment.

If you had enforced referential integrity between the client table and
the child tables of that with cascade-delete set to off, the user would
only have deleted the true "dead" clients.

You know that - at least now I'm sure - so what is your point?

Further, I tell my clients that my responsibility is off if they deal
with the backend directly; never had a problem with that.

And, by it's nature, should this happen that you or I (the developer)
hadn't set up RI right and the user did something like this by
mistake, it wouldn't be much different from any other possible damage
to the database which is where a decent backup is pulled from the
shelf.

I guess your intention is to warn the less experienced developer from
applying RI with cascade-delete set to on. This warning is right -
actually it is not easy to quickly browse the RI settings of your
database schema and check the settings from within Access. But at the
time when you feel confident with database schemas and RI, I feel it's
a very nice and strong tool.

/gustav

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com






More information about the AccessD mailing list