[GNC] Database storage

Robert Heller heller at deepsoft.com
Fri Sep 20 09:53:09 EDT 2024


At Fri, 20 Sep 2024 06:32:13 -0700 (PDT) Chris Miller <cjm at tryx.org> wrote:

> 
> Hi Jim, 
> 
> > Beware of confusion: the word "transaction" is already used on this list
> > to mean an "accounting record of an exchange of value". But I suspect
> > that here you use the word "transaction" to mean a "controlled and
> > reliable change to data stored in a database".
> Yes. They are similar. Both represent "atomic" updates, meaning "all or nothing". 
> 
> >> * Are transactions implemented? -- Let's assume, "Yes."

> Let's assume, "No." (-: Apparently SQLite represent zero improvement over
> the flat file storage. 

One thing that all of the *SQL backends do provide over the flat XML file
storage: accessing the data (*read-only!*) between runs of GnuCash is easier.
Instead of either trying to parse the XML or using Python bindings to the
GnuCash API, one can write code using SQL (in any language that supports SQL)
to grab data to generate reports, etc. outside of the GnuCash framework. I
believe at least one person on this list does exactly that.

I don't know if updating the database is possible without causing GnuCash to 
have a fit when next run.  Possibly yes, but...

> 
> Is there a way to update backing store anytime I make a change, and not
> periodically? It seems like leaving updates lying around in memory is a good
> way to lose updates when the dog pulls the plug out of the wall. 

GnuCash has some sort of journaling feature so that "crashes" can be recovered
from.

> 
> Thanks for the help, 

-- 
Robert Heller             -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
heller at deepsoft.com       -- Webhosting Services
                           


More information about the gnucash-user mailing list