From: <gon...@gm...> - 2007-05-25 19:12:17
|
Ok, now I get it and it makes sense. The extended abolish predicate for sets covers the middle ground between all-out cascade of all dependent predicates (undesirable in some cases) and a right-out forbid (which could also be undesirable if we intended to abolish just the predicates involved in the dependency). This allows for an interesting and more finer-grained user control over the abolishing of tables. It makes all the sense in the world for me. Thanks for clearing things up a bit. In this way we could have two predicates: - abolish/1, taking a single table or a set of tables (rolling back the abolish if dependencies outside the set were found) - abolish_cascade/1, which would cascade through all dependencies found, literally abolishing everything in the way (this predicate might also take a set of tables, but only for convenience or efficiency, since allowing for cascade already means that you can go and abolish tables one by one) Sounds great. Best regards, Gon=E7alo On 5/25/07, David Warren <wa...@cs...> wrote: > Gon=E7alo Lopes writes: > > Well, if these predicates can be written, then you can indeed get both > > behaviours of DBMS. > > > > If a table has dangling dependencies then you either: > > > > 1. forbid the abolishment > > 2. cascade the abolishment, meaning that you compute its forward and > > backward dependencies and abolish the whole set. > > > > These abolishment behaviours can be set at the table declaration > > level, or at the abolish_table predicate level, meaning you could have > > an abolish_table/1 and an abolish_table_cascade/1 or something like > > that. > > Right. I think Terry's point was that if the switch was set to > forbid, then if you had a cyclic dependency, you could never abolish > any table in the loop. So we at least have to include the cascade > option. (Unless we were to extend abolish to take a set of > predicates/calls to abolish and forbid the abolishment if any > dependency were to outside that set.) > > Regards, > -David > |