Re: Tree structure: how to calculate branch node sum, using results from a view that calculates leaf node sums.

2009-09-08 Thread Metin Akat
Why not record the account hierarchy with each transaction and think of that as a snapshot of the hierarchy when the transaction occurred? You get a little extra historical data that way.  You can emit a view row for every account in the lineage so that when you calculate account balances

Re: Tree structure: how to calculate branch node sum, using results from a view that calculates leaf node sums.

2009-09-05 Thread Metin Akat
One way I can think of is to bulk update all transactions belonging to a leaf account when moving that leaf account around. I can live with having to wait some time till this gets executed. Is this bad thinking or is it OK to some extent? On Thu, Sep 3, 2009 at 4:06 PM, Metin

Re: Tree structure: how to calculate branch node sum, using results from a view that calculates leaf node sums.

2009-09-05 Thread Chris Anderson
On Fri, Sep 4, 2009 at 11:34 PM, Metin Akatakat.me...@gmail.com wrote: One way I can think of is to bulk update all transactions belonging to a leaf account when moving that leaf account around. I can live with having to wait some time till this gets executed. Is this bad thinking or is it OK

Re: Tree structure: how to calculate branch node sum, using results from a view that calculates leaf node sums.

2009-09-05 Thread Jesse Hallett
On Sat, Sep 5, 2009 at 8:42 AM, Metin Akatakat.me...@gmail.com wrote: On Sat, Sep 5, 2009 at 10:20 AM, Chris Andersonjch...@apache.org wrote: On Fri, Sep 4, 2009 at 11:34 PM, Metin Akatakat.me...@gmail.com wrote: One way I can think of is to bulk update all transactions belonging to a leaf

Tree structure: how to calculate branch node sum, using results from a view that calculates leaf node sums.

2009-09-03 Thread Metin Akat
I am writing an accounting application. Generally, so far my design is as follows: 1. Account document. 2. Transaction document. It has kind of the usual structure... debit, credit, qty, value etc. Here debit and credit are two account UUIDs I have a view with a reduce, that emits all the

Re: Tree structure: how to calculate branch node sum, using results from a view that calculates leaf node sums.

2009-09-03 Thread Jan Lehnardt
On 3 Sep 2009, at 14:35, Metin Akat wrote: I am writing an accounting application. Generally, so far my design is as follows: 1. Account document. 2. Transaction document. It has kind of the usual structure... debit, credit, qty, value etc. Here debit and credit are two account UUIDs I have