File store (was Re: Salutations)

David Merrill dmerrill@lupercalia.net
Mon, 11 Dec 2000 16:16:10 -0500


On Mon, Dec 11, 2000 at 03:12:12PM -0600, Steve Greenland wrote:
> On 11-Dec-00, 14:43 (CST), Phillip J Shelton <shelton11@dingoblue.net.au> wrote: 
> > Sorry to be dense.  Isn't there some way to have the DB store the current
> > balance with each record? That way the  current balence would just be the
> > current balence from the last record.
> 
> One possible problem with this is that if you edit a transaction, you
> have to re-adjust the balance on all the subsequent transactions. A
> (perhaps) better choice would be to store the current balance with the
> account, but that might be problematic given gnu-cash's rather free
> mixing of accounts and categories (as I understand it, internally it
> might be completely clean).

So that means you would retrieve the current balance, and then work
*backwards* from there to calculate running balances in the ledger?
That sounds like it would work with small data sets.

One problem, though. Say the user 
jumps to a date in their ledger that is 11 months ago. How do you know
the balance after a given transaction back then, without having to
load the intervening transactions? In an environment with, say, 10,000
transactions per month, you just can't require the system to go
through them to come up with balances. The running balance just about
*has* to be stored along with the transactions somehow.

-- 
Dr. David C. Merrill                     http://www.lupercalia.net
Linux Documentation Project                dmerrill@lupercalia.net
Collection Editor & Coordinator            http://www.linuxdoc.org
                                       Finger me for my public key

Democracy means simply the bludgeoning of the people by the people for
the people.
		-- Oscar Wilde