Re: Stuck Up In My Category Tree - Mailing list pgsql-novice

From Brent Dombrowski
Subject Re: Stuck Up In My Category Tree
Date
Msg-id 309CF61A-2B4D-40CE-A120-DED4787A0534@gmail.com
Whole thread Raw
In response to Re: Stuck Up In My Category Tree  (Don Parris <parrisdc@gmail.com>)
List pgsql-novice
On Aug 23, 2011, at 11:17 AM, Don Parris wrote:

> On Wed, Aug 17, 2011 at 19:31, Don Parris <parrisdc@gmail.com> wrote:
>> I now have a work-around.  I have a view called amntby_cat that contains
> the sums by category, which I pull into a LibreOffice Calc sheet.  I then
> use a second sheet with a list of the top-level categories, and a series of
> formulas to sum all the sub-categories for each top-level category,
>
> I am now curious as to how business accounting databases approach
> transaction categories?  If I am selling widgets to all 7 continents (as i
> learned them), I might have sales as follows:

An approach I've seen before is to encode things into a department id. All North American departments start with 1,
etc.The rollups are then done by truncating the id down to the granularity required. At least this was the approach my
previousemployer took. They were more interested in particular customers, so the encoding was based on that. This was
ona relatively small scale basis (~500 employees and few enough customers to count by hand). I'm not sure how well that
wouldscale. It definitely takes some planning and forethought. 

Brent D.


pgsql-novice by date:

Previous
From: Don Parris
Date:
Subject: Re: Stuck Up In My Category Tree
Next
From: ennio
Date:
Subject: Re: Data corruption after an update set ...?