Subject | Re: [IB-Architect] Trigger Templates |
---|---|
Author | Joseph Alba |
Post date | 2000-07-05T17:22:48Z |
>First, do you think this stuff needs to be in the engine, or wouldI am still in the beginning pages of blr, maybe, when I'm done I'll have a
>an extension to GDEF be sufficient? Is there really much gain
>over simple cut and paste?
clearer picture / hint of what the engine is all about. But on the human
side, templates would help unstring the spaghetti of trigger codes. (Less
typing errors, neater format/code).
The disadvantage of cut and paste or GDEF would be if you would want to
produce the meta - script from the existing database. It would give back all
the spaghetti again. For instance, I like to have timestamps for all my
tables. At present, if I have 200 tables, this means, I'll have to have 400
triggers (1 for insert and 1 for update). But with templates, I'll only have
to have two. One for the template, another for the table assignment.
>If the answers are a) engine, b) template, and c) consistency, thereI think Templates would be to triggers as Roles are to Grants. Sure, you can
>are major changes to the engine, the system tables, and the various
>DDL processors, most of which will be difficult to make backwards
>compatible. Do you think this is worth the cost of a little cut
>and paste activity in a text editor? It seems to me likely that the
>number of keystokes expended in the implementation would exceed the
>number of keystrokes expended over the lifetime of the feature...
>
type in Grants to all users, Retyping each Grant set up for each new user.
But, roles have made Granting privileges a much more saner task.
I think Templates can even be extended to Table Structures:
CREATE TEMPLATE TABLE MyTemplateTable
( column1 integer not null primary key,
column2 char(10),
amount numeric(18,2)
);
CREATE Table MyTable1, MyTable2, MyTable3 FROM Template MyTemplateTable;
---------------------
If you take it all the way, Templates can become like Class Definitions in
Object-Oriented computing. And assignations to specific tables, triggers,
(even domains) would be the Instantiation part.
------------
>Ann and I are back from three days ...Glad to hear that. Especially for me. So, I better take advantage of this
> but temporarily too mellow to use them.
>
>Jim Starkey
temporary situation by adding in INHERITANCE (haha!)
CREATE TEMPLATE TABLE MyTemplateSon INHERIT From MyTemplateTable
(
aFewMore1 char(10),
aFewMore2 char(10)
);
[It can even inherit from multiple parents, then, you can tout
object-oriented SQL]
Joseph Alba
jalba@...