![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 |
#4
| |||
| |||
|
|
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. |

![]() |
| Thread Tools | |
| Display Modes | |
| |