Re: [GENERAL] View vs Constantly Updated Table

2008-12-16 Thread marcin mank
It is generally better to save the balance. The general rule in accounting systems design is "what can be printed, should be explicitly on disk". for an invoice: value before tax, tax percentage, value after tax, total before tax, total after tax, etc, should all be saved explicitly. An account s

Re: [GENERAL] View vs Constantly Updated Table

2008-12-16 Thread Ketema Harris
> How often are you using the "bank balance" value? I have no data on this as of yet, but it obviously needs to be correct for when the user looks at it. > The opposite argument, is how long does the computation take? The computation is simple, however the amount of data that goes into it g

Re: [GENERAL] View vs Constantly Updated Table

2008-12-15 Thread Ketema
On Dec 15, 11:25 am, r...@iol.ie ("Raymond O'Donnell") wrote: > On 15/12/2008 16:14, Ketema Harris wrote: > > > if i have a "column" that is a calculation, say a bank balance -> sum of > > all the debits and credits...is it more efficient to make a view that > > executes the underlying calc query d

Re: [GENERAL] View vs Constantly Updated Table

2008-12-15 Thread Adam Rich
> if i have a "column" that is a calculation, say a bank balance -> sum > of all the debits and credits...is it more efficient to make a view > that executes the underlying calc query doing the math, or to create a > table that has a column called balance that is updated for each > transaction? >

Re: [GENERAL] View vs Constantly Updated Table

2008-12-15 Thread Raymond O'Donnell
On 15/12/2008 16:14, Ketema Harris wrote: > if i have a "column" that is a calculation, say a bank balance -> sum of > all the debits and credits...is it more efficient to make a view that > executes the underlying calc query doing the math, or to create a table > that has a column called balance t