[wdmmg-discuss] A data model
William Waites
wwaites at googlemail.com
Wed Feb 17 14:20:47 UTC 2010
Another thing worth thinking about is an export of the data
into a format that tools like GNUCash (and M$Money's ilk) can
understand.
Downloading the Government's accounts and playing around with
them in home finance software, generating all the standard
reports and bar charts might be revealing and/or engaging for
some people.
There still is the unanswered question of what the most granular
"account" looks like. I would be inclined to model it like this:
p = Posting(timestamp, description, debit, credit)
region.add(p)
department.add(p)
function.add(p)
somethingelse.add(p)
foo.add(p)
bar.add(p)
i.e. hang the other (meta) data off of a posting
and,
Transaction(postings):
assert sum([p.credit for p in postings]) == sum([p.debit for p in
postings])
But I don't think we have enough information to sensibly make
transactions.
How accounts are defined is in terms of rules on the metadata. It
is relatively straightforward to arrive at Liz' set of account trees
(or pivot table) from this model.
Cheers,
-w
More information about the openspending
mailing list