Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: Archiving data in a database

by pingo (Hermit)
on Oct 04, 2004 at 06:52 UTC ( #396132=note: print w/replies, xml ) Need Help??


in reply to Re^2: Archiving data in a database
in thread Archiving data in a database

Only problem is if you are using MySQL, then you won't have triggers until version 5.

As a side note, I recently had to change an application over to using MySQL instead of Sybase, and I certainly wished the original developer had not bothered with triggers. :-)

Replies are listed 'Best First'.
Re^4: Archiving data in a database
by cleverett (Friar) on Oct 04, 2004 at 07:36 UTC
    Class::DBI provides triggers in a database transparent way.

    Although transaction support doesn't really fit the way it works, it does function and you can use it.

    As a bonus, instead of using triggers to sold the original posters problem, you _could_ subclass it and override the class methods for creating, deleting and updating objects.

Re^4: Archiving data in a database
by revdiablo (Prior) on Oct 04, 2004 at 17:31 UTC
    I certainly wished the original developer had not bothered with triggers

    I understand your sentiment, that it's a pain to migrate to a database with less functionality than the application currently uses. This is a legitimate problem, and deserves consideration, but I have to disagree with you in the general case. I think it would have been foolish of the original developer not to use triggers, if they were the right tool for the job. (You will probably reply that, in your case, they were not the right tool. That's fine, but I am talking about the general case here.)

    Not using all the mechanisms available in a database engine, just for the sake of "portability," strikes me as rather bizarre. That's almost like avoiding the use of map in a Perl program because it does not exist in C. Sure, the application might one day be ported to C, but one shouldn't limit the use of legitimate features based on what might "one day" happen.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://396132]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2021-01-25 21:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?