GUIDs (was Re: SQL backend for GnuCash 2)

Derek Atkins warlord at MIT.EDU
Thu Oct 26 15:22:28 EDT 2006


Quoting Phil Longstaff <plongstaff at rogers.com>:

> I am looking at having an int as the primary key for references to a
> table.  The GUID would be stored with the row as 4 ints (guid_1, guid_2,
> guid_3 and guid_4).  If we need to search a lot by GUID, we could have
> an index which spans those 4 columns.  I don't see there is a lot of
> need, though.
>
> GUIDs are currently used as the reference id in the XML format.  In the
> SQL format, though, int keys should work fine.  The only need for GUIDs
> that I can see is to retain a common set of object ids with past copies
> of a file i.e. if I archive some data, the set of accounts and tx data
> in the SQL database must have the same ids as the set of accounts and tx
> data in the archive.

Let me rephrase.   QOF uses the GUIDs for references!  Yes, it's used
in XML because it can, but QOF specifically uses it, too.  When you
want to reference a QOF object all you have is the type and GUID.

> 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