dbTalk Databases Forums  

Modelling dimensions for a ledger table

comp.databases comp.databases


Discuss Modelling dimensions for a ledger table in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Isak Hansen
 
Posts: n/a

Default Modelling dimensions for a ledger table - 07-28-2006 , 05:06 AM






We have what i think is a fairly run-of-the mill ledger table, with
columns id, account_id and amount.

In addition, we need a way to group/categorize/tag transactions on cost
bearers. Think this is often referred to as 'dimensions'..?


We're redesigning an older system with two dimensions, 'project' and
'department'. There's a table for each, containing mainly a name, and
two foreign key fields in the ledger table.
Also, the chart of accounts has a toggle for each dimension.

Thoughts on how to improve on the above?


For now we've just copied the old design, except for switching the
enable_departments/enable_projects toggles into many-to-many relations
between the accounts table and projects/depts. In hindsight I'm not
sure what we gain from that.


It all seems a bit awkward, and i'm sure there's a better way to go
about this. Someone willing to share their insight on the matter?

Isak


Reply With Quote
  #2  
Old   
Ed Prochak
 
Posts: n/a

Default Re: Modelling dimensions for a ledger table - 07-28-2006 , 10:00 AM







Isak Hansen wrote:
Quote:
We have what i think is a fairly run-of-the mill ledger table, with
columns id, account_id and amount.

In addition, we need a way to group/categorize/tag transactions on cost
bearers. Think this is often referred to as 'dimensions'..?


We're redesigning an older system with two dimensions, 'project' and
'department'. There's a table for each, containing mainly a name, and
two foreign key fields in the ledger table.
Also, the chart of accounts has a toggle for each dimension.

Thoughts on how to improve on the above?


For now we've just copied the old design, except for switching the
enable_departments/enable_projects toggles into many-to-many relations
between the accounts table and projects/depts. In hindsight I'm not
sure what we gain from that.


It all seems a bit awkward, and i'm sure there's a better way to go
about this. Someone willing to share their insight on the matter?

Isak
Rather than copy the old design, have you started from scratch and done
an ERD? (Entity Relationship Diagram)

general questions you should be asking include:
what are the entities we are trying to model?
what questions (queries/reports) do we expect toanswer when we are
done?
how do the relationships change among the entities?

A good data modeller is a useful person to have in this part of the
project. (this is someone who helps in the LOGICAL design, not a DBA
who usually deals with the Physical design of the Database.)

If your requirements are not too unusual, why not get a COTS accounting
package?

HTH,
Ed

(Commercial Off The Shelf)



Reply With Quote
  #3  
Old   
dataman
 
Posts: n/a

Default Re: Modelling dimensions for a ledger table - 07-31-2006 , 06:04 PM



Quote:
We have what i think is a fairly run-of-the mill ledger
table, with columns id, account_id and amount.

In addition, we need a way to group/categorize/tag
transactions on cost bearers. Think this is often referred
to as 'dimensions'..?

We're redesigning an older system with two dimensions,
'project' and 'department'. There's a table for each,
containing mainly a name, and two foreign key fields in
the ledger table. Also, the chart of accounts has a toggle
for each dimension.
Thoughts on how to improve on the above?


For now we've just copied the old design, except for
switching the enable_departments/enable_projects toggles
into many-to-many relations between the accounts table and
projects/depts. In hindsight I'm not sure what we gain
from that.

It all seems a bit awkward, and i'm sure there's a better
way to go about this. Someone willing to share their
insight on the matter?
Isak

Does the model support the types of reporting you want to
accomplish? If so, you're on the right path. The reporting
requirements drive the structure of a dimensional model, not
the dependencies of the data.


Reply With Quote
  #4  
Old   
Isak Hansen
 
Posts: n/a

Default Re: Modelling dimensions for a ledger table - 08-02-2006 , 04:55 AM



dataman wrote:
Quote:
Does the model support the types of reporting you want to
accomplish? If so, you're on the right path. The reporting
requirements drive the structure of a dimensional model, not
the dependencies of the data.
Thanks for your replies.

Was thinking that a full unlimited-dimension design would be more
elegant, and common enough to get some hints here, but as the current
model meets our requirements we'll just stick with that.

We are starting over from scratch, as the old model was flawed in so
many ways. We've probably made a few bummers, but are confident it's
significantly better.


Have some, not 100% up to date, basic docs up at
<http://trac.lodo.no/lodo2/wiki/DatabaseModel>.

The project is ment to be open sourced in some way or part, but we're
not settled on the specifics yet, so drop us a note if you'd like to
use or contribute to the system.

And yes Ed, we probably shouldn't be working on this project, for a
variety of reasons..


Isak



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.