Db structure (Phil Longstaff)

J. Alex Aycinena alex.aycinena at gmail.com
Mon Aug 10 20:09:17 EDT 2009


Phil,


> ---------- Forwarded message ----------
> From: Phil Longstaff <plongstaff at rogers.com>
> To: Gnucash list <gnucash-devel at lists.gnucash.org>
> Date: Sun, 9 Aug 2009 15:46:46 -0400
> Subject: Db structure
> 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.

I'm currently doing some work to enhance the US income tax
capabilities. This work uses account slots: tax code (not new, already
exists), payer-name-source (not new, already exists), and copy-number
(this is a new slot for my work). I would also like to propose to use
some book-level slot information for 'income-tax-entity-type' and
'income-tax-entity-name' to add support for income taxes beyond just
personal (e.g., corporate, partnership, etc.).

How would your proposal affect my work in progress? By the way, I'm
close to finishing it and submitting a patch but still need to do more
testing.

Alex




>
> 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.
>
> 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?
>
> Phil
>


More information about the gnucash-devel mailing list