Subject Re: [IB-Architect] Trigger Templates
Author Joseph Alba
>Just to add more to my prior posting:
> MsSql 7 doesn't keep compiled version of stored procedures, only sources.
>It compiled procs on demand and so a procedure can fail during execution
>because one referenced object cannot be found. You can add and drop db
>objects even if they are used by some procedure or trigger.
> Is this model related to the loose link between triggers and tables that's
>being suggested for IB?
>

No. Templates could be implemented with REFERENTIAL INTEGRITY constraints.
Thus, changes in tables, can be verified not only on its own statically
owned triggers, but also against the dynamically referenced template
triggers.

(But also, there are other possibilites, But the point is... most of these
concerns have already been worked out in the Application Server world. We
just have to take a quick peek -- for those yet unfamiliar. But I'm sure
there are a number of others who are very familiar with these issues
already...)

Also, Corollarily (haha), changes in Triggers can be verified against
referencing tables. It is really a simple lookup matter.

Lookup Tables can be a many to many relationship of Triggers X Tables, with
a glance that columns used by Triggers and columns contained in Tables ...
(ensure that columns used in template triggers should be present in all
referencing tables, and tables cannot drop columns that are used by template
triggers that it uses).

(But I also remember late-binding-- haha.) Late bound triggers can also be
defined should that the referential contraints are only verified at run time
instead of at definition time.

This would allow IB to store procedure-like Triggers, before even any table
has been defined and allows the possibility of defining a trigger
repository, that can be attached to tables that would need its
functionality... Opening the possibility of 3rd party trigger happy makers.

I also have a feeling that Template Triggers will make replication a lot
simpler,
Also, atabase definitions will be a lot cleaner to look at.

----
This is where I say... enough already. I have a tinggling feeling at the
little hair at the back of my neck that somewhere in this world, somebody
whose initials are H and B is seething... annoyed... and howling.

Joseph Alba
jalba@...