What the use of 'slots' table in gnucash with mysql
Jorge Zapata
jorge.zapata at jazg.net
Mon Sep 17 11:39:26 EDT 2012
Thanks for your feedback Derek, I thought it would be great to insert
new records outside the program just by programming some SQL queries,
but now I'm thinking about using the API like you suggest and avoid
future problems with my accountancy.
On Sun, 2012-09-16 at 15:30 -0400, Derek Atkins wrote:
> Hi,
>
> On Sun, September 16, 2012 3:12 pm, Jorge Zapata wrote:
> > Hi, I'm developing a PHP web application and I want this app to read/write
> > into gnucash mysql database just like the program does.
>
> Writing into the database without using the GnuCash API is not supported,
> and is actively discouraged.
>
> > I have an idea
> > what
> > is the goal of most of the tables but I simply don't what's the use of
> > slots table.
>
> ... and this is one reason why we have the above policy.
>
> > I activated a log in mysql server just to understand which insertions are
> > performed by gnucash in simple transactions and I've realized that every
> > insertion involves the slots table.
> > Can someone explain me what slots table does? If I don't want to consider
> > sots table in my application will that cause a problem when working with
> > the same database but using the program?
>
> Yes, it will, if you write into the database.
>
> The slots table contains important information. It's a general KeyValue
> hierarchy, and is derived from the XML storage. GnuCash is NOT a "DB
> App". It uses a DB purely as a datastore, but the business logic is NOT
> contained in the database and any writes you make may cause GnuCash's
> invariants to break.
>
> You are welcome to read from the database, but don't write.
>
> If you must write, you should use the GnuCash API, which is avaiable in C,
> Scheme, and Python.
>
> > Thanks
> >
> > --
> > *Ing. Jorge A. Zapata Guridi*
> > *Software Developer*
>
> -derek
>
More information about the gnucash-devel
mailing list