Subject | Re: [IBO] Last edited by... |
---|---|
Author | Helen Borrie (TeamIBO) |
Post date | 2002-01-12T23:44:03Z |
At 06:32 PM 12-01-02 +0000, you wrote:
Just on the subject of triggers: to me, they are the arteries of a RDBMS. If you define foreign keys with cascades, the database will create triggers that are normally invisible to you. I consider the coding time spent writing them is paid back in Spades.
Sure, I'm the first to agree that it's tedious to have to write triggers for a lot of tables but, for your task, provided you use the same names for the two columns database-wide, you really only have to write two "boilerplate" triggers and copy/paste in your script. In fact, I can see how easily we could modify IB_SQL to provide a neat little interface in the script tool, to do just this.
Just my 0.02 AUD...
regards,
Helen Borrie (TeamIBO Support)
** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at www.ibobjects.com
>Hello,Delegating this recording to one logging table is one option, as suggested by Thomas S. You sometimes have other potential application requirements that make this a very elegant approach, too. (Thomas, if IBLogManager doesn't use triggers, I'd be very interested in getting a process description for the FAQ...)
>
>I need some kind of modification recording for every table. A user
>must be able to see who last edited a certain record in a certain
>table, and when. I was thinking of placing edited and editedby fields
>in every table and then use UPDATE and INSERT triggers to update the
>data. The problem is that there will be a huge number of triggers if
>I do so. Are there any other options?
Just on the subject of triggers: to me, they are the arteries of a RDBMS. If you define foreign keys with cascades, the database will create triggers that are normally invisible to you. I consider the coding time spent writing them is paid back in Spades.
Sure, I'm the first to agree that it's tedious to have to write triggers for a lot of tables but, for your task, provided you use the same names for the two columns database-wide, you really only have to write two "boilerplate" triggers and copy/paste in your script. In fact, I can see how easily we could modify IB_SQL to provide a neat little interface in the script tool, to do just this.
Just my 0.02 AUD...
regards,
Helen Borrie (TeamIBO Support)
** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at www.ibobjects.com