|Subject||Re: [IB-Architect] Trigger Templates|
>>I was refering to Delphi. But object-oriented analysis does present several
>> Delphi is limited to delegation because it does not have multiple
>> inheritance. Now, starting with Delphi 4 we have Interfaces,
>> which provide
>> some semblance of multiple inheritance
> I hardly can imagine a multiple inheritance of tables, but it should be
>possible with some restrictions. (I imagine the face of Jim reading this.)
opportunities for multiple inheritance (although you'll have to flatten it
out in the implementation stage. Like in the mix-in example, you use mix-ins
if you want to give heterogenous objects a simlar feature. Like for
instance, if you want your tables to have that timestamp feature, you can
define the usual table, then also make the table inherit the "mix-in"
feature of inserted_by, insert_time, updated_by, updated_time, ... )
CREATE DOMAIN USERNAME VARCHAR(50);
CREATE DOMAIN USERTIME TIMESTAMP;
CREATE TABLE TIMESTAMP_MIXIN
SET TERM ^ ;
CREATE TRIGGER INSERT_TIMESTAMP
BEFORE INSERT POSITION 1
CREATE TRIGGER UPDATE_TIMESTAMP
BEFORE UPDATE POSITION 1
SET TERM ; ^
CREATE TABLE PERSON
CREATE TABLE CLIENT INHERIT FROM PERSON, TIMESTAMP_MIXIN
(So, all your non-virtual object tables - meaning the instantiated tables,
can inherit from their own hierarchical / logical ancestry, but you can
place a mix-in as a way to introduce a common feature that is really out of
the way when the ancestry is concerned - like, a Person object does not have
a Time_Stamp, but you want the instantiated rows to have time_stamps for all
your instantiated tables)
Just imagine how much cleaner the server code could be.
>> In fact, triggers can be loosely coupled to tables.defined
> Ah, you want them as Delphi's event handlers, where they can remain
>in code even if no component is using them.Exactly! If you notice, event handlers are just like triggers - if you think
of it, they are triggers.
>Just in case the new code has a bug?Hehe.... again, Teamwork, communication, cooperation... no finger pointing.
Just get the job done.
Here, we have a saying, "Sama-sama, sa hirap at ginhawa" (Together, in
difficulties and prosperity). That's our way of saying, one for all, all for
>Boys will be boys.
> Me, too. Later, I realized that "internal implementation details" is not
>the best way to refer to the character of a person.