Professional Web Applications Themes

How widespread is the use of triggers these days and how concerned about performance?.... - IBM DB2

Fifteen years ago when databases were primarily used in the context of transaction-intensive applications, triggers were a nice feature of a DBMS system that did not get used because of performance concerns. Fast forward 15 years, it seems to me that 95% of database usage is for non-transaction intensive information (I could be wrong in this). Given this I see increasing usage of triggers for doing various necessary things that regular reporting does not do. Am I just dreaming or that triggers are being increasingly used? Are performance concerns not important in the above context as long as you are ...

  1. #1

    Default How widespread is the use of triggers these days and how concerned about performance?....

    Fifteen years ago when databases were primarily used in the context of
    transaction-intensive applications, triggers were a nice feature of a
    DBMS system that did not get used because of performance concerns.

    Fast forward 15 years, it seems to me that 95% of database usage is
    for
    non-transaction intensive information (I could be wrong in this).
    Given this I see increasing usage of triggers for doing various
    necessary things that regular reporting does not do.

    Am I just dreaming or that triggers are being increasingly used?

    Are performance concerns not important in the above context as long as
    you
    are mindful of stuff like cascading triggers and keeping the trigger
    code short?

    Thanks in advance for your insights, experiences and opinions.

    regards
    Nari

    Nari Kannan
    Nari Kannan Guest

  2. #2

    Default Re: How widespread is the use of triggers these days and how concernedabout performance?....

    Nari Kannan wrote:
    > Fifteen years ago when databases were primarily used in the context of
    > transaction-intensive applications, triggers were a nice feature of a
    > DBMS system that did not get used because of performance concerns.
    I disagree. This opinion on triggers is similar to that on referential
    integrity (RI) 15 years ago - the logic exercised by the database to
    maintain referential integrity is not free, but if the rdbms does not do
    it, it gets done in the application, where it costs the same if not more
    - just now the application becomes "slower" versus the rdbms. Whether
    the logic of triggers or RI is performed in the application or the
    database, it's going to have similar pathlength - the only question is
    whether the rdbms or application can be more efficient. As more
    applications are written in languages that emphasize portability over
    performance (Java) or ease of learning over performance (Visualbasic),
    the benefits of putting logic that centres around data further down into
    the database engine become stronger.
    >
    > Fast forward 15 years, it seems to me that 95% of database usage is
    > for
    > non-transaction intensive information (I could be wrong in this).
    I doubt this, but I have no hard evidence to prove you wrong. I suspect
    that Gartner or some other consulting group has broken down the rdbms
    market amonght OLTP, BI, OLAP, Data Mining and so forth. I think that
    OLTP would be more than 5%. Certianly there has been a lot of growth in
    ERP/CRM companies (SAP, Peoplesoft, Siebel, Baan, JD Edwards) over the
    last fifteen years, and their premier applications tend to be
    OLTP-intensive.
    > Given this I see increasing usage of triggers for doing various
    > necessary things that regular reporting does not do.
    >
    > Am I just dreaming or that triggers are being increasingly used?
    Yes, they are used increasingly. A search on triggers in [url]www.deja.com[/url]
    should show this.
    >
    > Are performance concerns not important in the above context as long as
    > you
    > are mindful of stuff like cascading triggers and keeping the trigger
    > code short?
    >
    > Thanks in advance for your insights, experiences and opinions.
    >
    > regards
    > Nari
    >
    > Nari Kannan
    Blair Adamache Guest

  3. #3

    Default Re: How widespread is the use of triggers these days and how concerned about performance?....

    Hi,
    I grew up in the school of hard knocks when it comes to programming
    and DBs
    (no university degree) so my opinion might vary with others ;-) I consider
    myself a generalist rather than a specialist when it comes to systems.
    Whilst I am a programmer by trade, I consider part of my to ensure that the
    data is stored correctly too. I.e. That the design is good from front to
    back.

    I've always been an avocate of triggers and stored procedures for several
    reasons.

    1. The simplify the applications running them.
    2. They ensure that business logic is always applied no matter how badly the
    application is written.
    3. Performance wise they are always faster because they are with the
    DB/server.

    I've encountered a number of people who are the direct opposite of this.
    I.e. they refuse to allow any triggers, procs or referential integredy. The
    reasoning they almost always offer me is that by having non of this, the
    design is more portable to other RDBMS's, easier to maintain etc.

    Whilst they are valid reasons, I have (so far) always found that the
    database in question is a complete mess. Missing data, inconsistant/poor
    design, orphan data and tables, etc. Not to mention the applications trying
    to run them.

    In reality I think that the real reasons for this attitude are more to do
    with: 1. Laziness. (I.e. they can't be bothered writing the necessary sqls
    to correctly build and maintain their DBs). 2. Lack of knowledge of
    databases, and 3. An un-willingness to learn.

    Surprising to me has been a fairly regular attitude amongst programmers that
    a database is just a place to store information. Like it was a file or
    something. They have no interest is ensuring the data their precious
    application is sending is stored correctly or reliably, and don't care
    about maintenace of it.

    I have yet to find a database/application that would not be better off with
    a proper set of stored proces and and triggers. I'm sure they are out
    there. Just haven't seen one in my experience.

    Sorry for the sermon ;-)

    Derek.

    Derek Clarkson Guest

  4. #4

    Default Re: How widespread is the use of triggers these days and how concerned about performance?....

    I have been teaching Database Design and administration (for a major
    vendor) and a working, hands-on DBA for 20+ years. One thing I have
    learned and tried to pass on to my students is that ultimately "the
    buck stops here." It does not matter that a programmer's faulty logic
    or the careless use of an interactive SQL tool corrupted the database,
    it's the DBA's fault for not preventing it from happening.

    The average DBA can not enforce programming standards or review code -
    time and policy usually will not allow it. And today's databases are
    updated from a multitude of sources outside the immediate control of
    the server and the DBA. I have seen production databases destroyed by
    end users and an Excel spreadsheet because by policy update rights
    were not removed. And what DBA hasn't taken the rap for poor
    application performance?

    Where mainframe based OLTP platforms managed problems such as
    deadlocks and rollbacks, the client-server DBMS systems of today leave
    much of those issues to the programmer to design, program, and react
    to. And let me ask - have you ever met a programmer who really
    understood concurrency?

    So, to me, triggers, check constraints, and referential integrity
    become the last bastion of control. I do not wish to do a
    programmer's job for him and I consider many of the UDF's, Stored
    Procedures, and even triggers issues that could and should be handled
    at the program level. But to paraphrase the marketing slogan for an
    overnight delivery company: When it absolutely, positively got to be
    done ....
    Fred Prose Guest

  5. #5

    Default Re: How widespread is the use of triggers these days and how concerned about performance?....

    "Fred Prose" <fprosehotmail.com> wrote in message
    news:195a4770.0308040641.5e3682c5posting.google.c om...
    > I have been teaching Database Design and administration (for a major
    > vendor) and a working, hands-on DBA for 20+ years. One thing I have
    > learned and tried to pass on to my students is that ultimately "the
    > buck stops here." It does not matter that a programmer's faulty logic
    > or the careless use of an interactive SQL tool corrupted the database,
    > it's the DBA's fault for not preventing it from happening.
    <snip>
    > So, to me, triggers, check constraints, and referential integrity
    > become the last bastion of control. I do not wish to do a
    > programmer's job for him and I consider many of the UDF's, Stored
    > Procedures, and even triggers issues that could and should be handled
    > at the program level. But to paraphrase the marketing slogan for an
    > overnight delivery company: When it absolutely, positively got to be
    > done ....
    lets invalidate the support contract...? Seriously much of what you say
    makes sense only in the context of an organization that

    a) has well defined business rules and
    b) has in-house development.


    What are you going to do with SAP,PSFT,Oracle Financials,JDE etc? slap some
    extra constraints and RI on them?

    Cos IMO that is what most DBAs are dealing with.



    Niall Litchfield Guest

  6. #6

    Default Re: How widespread is the use of triggers these days and how concerned about performance?....

    >> Am I just dreaming or that triggers are being increasingly used? <<

    I would guess less used. DRI actions, DEFAULTs and CHECK()
    constraints do what TRIGGERs used to do in procedural code. Being
    predicates, these features can also send information ot the
    optimizers, which triggers and procedures cannot.
    --CELKO-- Guest

Similar Threads

  1. #39560 [NEW]: Inconsistent behaviour of strtotime when days > days in month
    By php at colin dot guthr dot ie in forum PHP Bugs
    Replies: 1
    Last Post: November 20th, 05:21 PM
  2. Concerned
    By Sandra in forum Macromedia Freehand
    Replies: 10
    Last Post: November 4th, 06:02 PM
  3. Widespread Panic Concert Photos.
    By Paul Brecht in forum Photography
    Replies: 1
    Last Post: July 31st, 02:52 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139