Schema

David Merrill dmerrill@lupercalia.net
Sat, 16 Dec 2000 12:05:42 -0500


On Sat, Dec 16, 2000 at 08:26:24AM -0600, Rob Browning wrote:
> David Merrill <dmerrill@lupercalia.net> writes:
> 
> > I'd recommend we use the standard GUID including MAC where it is
> > available. If there is no MAC, then we could fallback to some
> > arbitrary 48 bit pattern entered in the config table, or do without it
> > entirely. After all...
> > 
> > Q: How often would a database back-end NOT have a MAC address? 
> > A: Only when running a local-only application. In which case, you
> > don't NEED the MAC address to guarantee uniqueness, right?!?!?
> 
> I don't think this is a good idea.  We have the current GUIDs, they
> work, and they're supposed to be somewhat mathematically well founded.
> The problem with what you're suggesting is that we intend for GUIDs to
> be *globally* unique, as in, planet (or universe-wide).  If you start
> using one scheme when you have a MAC address and one scheme when you
> don't, there's no mathematical foundation for believing that in two
> different places you won't be likely to generate the same GUID.
> 
> The reason we want these guids to be globally unique is that
> eventually copies of gnucash might be talking to each other, or
> storing/archiving their data in common places, etc.
> 
> At least this is why we've done what we've done up to now.

I've given this some more thought, and you're right about the method I
suggested being unwise. I'm still not sure about the current
algorithm, though.

When I looked at the code the algorithm seemed nonstandard to me, and
I want to make sure I use a standard GUID algorithm. It's well tested
and has proved itself. If Our algorithm is already standard, then I
just misread it; I'm human. If it's not, then I think it should be.

Obviously, the current algorithm is working. So there is  no reason to
change it, but I'm doing essentially a new implementation of that
code, so I want to make sure it is solid in all respects. Possibly
postgres has a built-in guid factory as Oracle does, and this is a
nonissue anyway, so let's not argue over it. :-)


-- 
Dr. David C. Merrill                     http://www.lupercalia.net
Linux Documentation Project                dmerrill@lupercalia.net
Collection Editor & Coordinator            http://www.linuxdoc.org
                                       Finger me for my public key

Let My worship be in the heart that rejoices,
For behold--
All acts of love and pleasure are My rituals.
		-- from The Charge of the Goddess, Doreen Valiente