Db structure

Colin Law clanlaw at googlemail.com
Sun Aug 9 16:50:42 EDT 2009

2009/8/9 Phil Longstaff <plongstaff at rogers.com>:
> For the most part, I've tried to make the db schema match the XML schema,
> including warts.  There are 2 places I'd like to change, and am looking for
> feedback:
> 1) Each account stores a number of boolean flags (tax-related, hidden,
> placeholder) in the slots table.  It would be simpler if these were just
> boolean values in the accounts table.
> 2) Each budget stores all of the budget information in slots, with path names
> of <guid>/<period> (e.g. 294ddec82b0840980d98203/12).  These should be moved
> to a new budget_values table with columns id (autoinc/primary key),
> account_guid, period_num, budget_value (numeric).  This would allow better
> access to the budget info by external tools.

Excellent idea, yes please

> Both of these proposals would involve moving the db storage for certain fields
> from slots to a more normal table structure.  In the case of the account flags,
> the xml file structure could also change to add "<hidden>true</hidden>" format.
> This leads to potential backwards compatibility problems in the xml file
> format.  However, as long as 2.4 can read 2.2 XML files, do we need to keep
> backwards compatibility so that 2.2 can read 2.4 files?

This would not bother me but I am not really qualified to comment on this point.

Colin L

More information about the gnucash-devel mailing list