Gnucash 2.3.0 - Database schema and third party tools

Phil Longstaff plongstaff at rogers.com
Tue Jun 30 08:00:46 EDT 2009


On June 30, 2009 04:33:27 am marcus.wolschon at googlemail.com wrote:
> On Mon, 29 Jun 2009 21:30:56 -0400, Phil Longstaff <plongstaff at rogers.com>
>
> wrote:
> > Here's a first cut at the database schema.  It only covers the main
>
> tables
>
> > and
> > types (not business tables).  I will put this information into the header
> > files
> > so that it gets put into the doxygen developers documentation.
> >
> > Although there are some fields which contain guids which reference other
> > tables, they are not defined as foreign fields (yet).  2 reasons: 1)
> > sqlite3
> > doesn't enforce foreign fields (although it is apparently possible to use
> >
> > triggers to do some checking) and 2) gnucash is not a database app and
> > doesn't
> > necessarily enforce the checking (2 known instances - the "add price"
> > dialog
> > creates (and therefore stores) a new price before the commodity has been
> > set,
> > and lots in the LOTS table sometimes have the account_guid set to NULL).
>
> Thanks. :)
>
> I'll start working on my implementation in the next days then.
> The accounts-Table has a field "non_std_scu".
> I guess a std-scu would be the one of the associated currency
> but does it not violate the first normal form to save this
> in an extra field?

It might.  I'm not a database expert.  I simply duplicated the XML backend 
functionality into an SQL database.

Phil


More information about the gnucash-devel mailing list