Home > Ask the Data management / BI Experts > Questions & Answers > Generating images of DB tables
Ask The Data Management Expert: Questions & Answers
EMAIL THIS

Generating images of DB tables

Craig Mullins, Years 2005-2006 EXPERT RESPONSE FROM: Craig Mullins, Years 2005-2006

Pose a Question
Other Data Management Categories
Meet all Data Management Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 13 November 2003
Is there any short side to using triggers for generating before and after images of DB tables? If so, what are they?

>
Well, modifications made to a table with triggers on it will perform worse than to one without triggers on it. But of course, that is an incomplete answer. You need to judge the entire process - that is the modification plus the "capture of the before/after image" you need to do. Triggers should be well suited for your purposes if you wish to record the data the way it was before the modification and then the way it is after.

However, you might want to re-consider why you want to do that? All of that data already is captured by DB2 in the logs. With a log analysis product (such as Log Master for DB2).

You may have perfectly valid reasons for wishing to do this using triggers. Other things to keep in mind when using triggers are the management and development issues.

Management issues include building/altering triggers appropriately, ensuring they fire in the proper order (probably not a big concern for you though) avoiding more than 15 levels of trigger nesting and using triggers with LOAD. LOAD will not fire INSERT triggers so be aware of that.

The biggest development issue is debugging. It can be difficult to ensure that the triggers are working properly as you create them. I've seen some shops use "trigger columns" in their tables to help debug problems. These columns are simply a TRIGGER_NAME and TRIGGER_TIMESTAMP that records the name of the trigger that last accessed the trigger row and the timestamp when it ran. You may or may not want to include these columns depending on the logic that you will be putting in your triggers.

Good luck.

Editor's note: Do you agree with this expert's response? If you have more to share, post it in one of our discussion forums.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
IBM DB2 management
How to select an MPP database: DB2 vs. Teradata
What are the top database management systems (DBMS)?
Are there benefits to using both Teradata and a DB2 database?
Tips for evaluating top database management systems and choosing a small DBMS
Exec explains IBM's Information On Demand (IOD) initiative
IBM DB2 9 Fundamentals certification (Exam 730): Sample questions about tables, Part 7
IBM DB2 9 Fundamentals certification (Exam 730): Sample questions about tables, Part 6
IBM DB2 9 Fundamentals certification (Exam 730): Sample questions about tables, Part 5
DB2 basics
IBM DB2 basics

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts