recovery

hendrik at topoi.pooq.com hendrik at topoi.pooq.com
Wed Oct 31 14:16:41 EDT 2007


On Wed, Oct 31, 2007 at 11:55:09AM +0000, Keith A. Milner wrote:
> On Wednesday 31 October 2007 07:02:16 Tarlika Elisabeth Schmitz wrote:
> > On Tue, 30 Oct 2007 20:55:07 -0600
> > I can see that it would be too slow to save a 13MB xml file after every
> > transaction. Why use xml anyway?
> 
> Looking at the archives, I believe the current XML database was inherited by 
> the current devs. It seems everyone (or at least most people) agree that XML 
> is not the correct format to store the data in (great for data interchange, 
> not for storage).

Long ago, gnucash stored its data in binary, with its amounts of money 
recorded in binary floating-point.  I pointed out that this was not 
adequate for financial data, wiere pennies matter on amounts line a 
billion dollars, and the roundoff errors involved in binary/decimal 
conversion are ultimately unacceptable.

This started a revolution in which money would be represented in exact 
form; as it happens they chose character strings that represented 
amounts as an intergal number of tiny units of currency.  For my 
accounts, this unit turned out to be a penny.  I gather it's different 
for stock-trading accounts.

Along with this change, XML was brought in.
 
> 
> Changing this is a significant task, and one which few appear to be willing to 
> undertake, especially as it's likely to break some things and remove 
> some "back-door" capability that some people use.

I certainly do use the XML directly -- I've written my own report 
generator to produce reports in a form I find useful.  It reads the XML 
file.

> At one point there was a project to provide an optional PostgreSQL database 
> instead of the XML one. This is a fine idea in many environments as it can 
> provide multi-user capability, proper database referential integrity, better 
> data recoverability, etc.

And it would have enabled multiple users accessing the same data base 
simultaneously.

What I'm discovering is needed now is to permit disconnected operation 
-- kind of a miniGnucash that I can use in roaming mode on my Palm 
of Nokia 800 or sush when disconnected from my regular Gnucash server to 
enter transactions, look at the balances, etc. (knowing full well I'm 
not seeing up-to-date accurate balance information) and later have these 
data sync'ed with the main data base when I have the chance -- more like 
a distributed data base than a centralised one.  I had some hopes that 
this could be done with the XML backend, using variations on the 
merge-algorithms used in version-control systems.  (You'd have to take 
account of the nested XML syntax when carrying out the merge).

I hope that any step in the direction of a data base back-end leaves 
open the possibility of distributed and off-line operation.

Perhaps it would be useful to open a dialog with the monotone 
implementors;  they use sqlite for storage and have their own 
superstructure to accomplish synchronisation.

-- hendrik


More information about the gnucash-user mailing list