[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Thoughts on Voiding Invoices



On Mon, 2006-09-25 at 17:49 -0700, Chris Travers wrote:

> > Agreed. A good DBMS like postgres can handle all this using triggers.
> > its actually very simple SQL in a well-designed database.
> 
> Except that by doing so you compromise your audit trail.  You want to
> have as few transactions as possible to bring the data into a
> consistant state.

That's not correct. The audit trail is unaffected. Its remains: its at
another level.
Within a business transaction you have one database transaction. (Any
more and you have the potential for loss of data integrity.) The code
that runs within a transaction tends to get moved from client processes
into the server, as database procedures fired by db triggers. This is a
physical application architecture decision to simplify code, and remove
the potential for code duplication across different types of client
processes and thus reduce the potential for bugs.