SQL backend for GnuCash 2

Derek Atkins warlord at MIT.EDU
Fri Oct 27 12:56:10 EDT 2006


Quoting Phil Longstaff <plongstaff at rogers.com>:

> OK.  I was just giving an example.  A better one which comes to mind is
> with kvp frames.  A kvp frame can be a number, string, date, list, or
> subframe.  Each element of a list is in itself, a kvp frame, so there's
> a hierarchy here (and Josh mentioned how bad RDBMS's are with these).
> In this case, a slot can have a parent slot, either because it's a
> subframe or a member of a list.  In this case, cascaded deletes help
> clean things up because the members of the list or subframes can be set
> to be automatically deleted when the parent is deleted.  Now, if I want
> to delete a complete slot named X, I just delete the top level row in
> the table, and cascaded deletes take care of the others.

KVP frames are easy to handle.  KVPs are always loaded and stored as
an atomic unit.  You just delete the whole object and
then write out the whole object every time:

DELETE * from kvps where object_id=$guid;
store_kvp;

> Frequency specs are another example, because a compound fs can have fs's
> as children.

I dont know enough about FS to know whether they are also atomic objects
like KVPs.

> Phil

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available



More information about the gnucash-devel mailing list