Subject | Re: [firebird-support] Re: UUDIs/GUIDs and problem with uuidlib |
---|---|
Author | David Johnson |
Post date | 2006-07-18T12:49:29Z |
Personally, I just use the system call getGuid() [in windoze] or getuuid
() [in *nix].
() [in *nix].
On Tue, 2006-07-18 at 12:23 +0000, lutterot wrote:
> > > I need to use UUDIs/GUIDs as primary keys in my DB...
> > Don't do this. It's fine to have a UUID as a separate, unique field
> > but having it
> > as a primary key is not good, not at all.
>
UUID's or something similar are needed for any distributed work. Not
all projects have the luxury of a centralized database and solid
communications infrastructure.
> But this is what I need for this project...
>
> > Why do you use two different UID-techniques in one and the same
> database?
>
> The UUIDs are said to be optimized for fast indexing and are smaller,
> so that this is the choice for the DB. The GUIDs, however, are the
> standardized representation and have to be used on the application
> level. I don't know enough about uuidlib's UUIDs to convert them to
> GUIDs in the application.
The GUID is a 16 byte value. The 36 byte form is simply a formatted
hexadecimal string. I could not tell you which flavor of uuid the udf
uses that gives you 22 bytes (Ann? Helen?), but there are several
flavors of uuid covered by the standard.
>
> > Implementing UDFs in .NET would be quite a waste of both,
> programming time and CPU cycles.
>
> Maybe. But at least I know how to program in C# :-)
<flame>And what exactly is the price of tea in china?</flame>