Subject | Re: [Firebird-Architect] GUID Key Fields |
---|---|
Author | Daniel Albuschat |
Post date | 2005-03-22T09:08:42Z |
On Mon, 21 Mar 2005 21:27:41 -0800 (PST), Kevin Berry
<kevinbe71@...> wrote:
You simply need a set of UDFs to convert a hex representation
to/from the 128-bit number (maybe in a char(16) without
a character set applied, or so. I think there's no 128-bit integer
in firebird, is there?).
If there *is* a 128-bit integer in FB, it should be about the
same with some GUID-conversion UDFs.
Bye,
Daniel
--
eat(this); // delicious suicide
<kevinbe71@...> wrote:
>Well, this could be possible with firebird, too.
> Thanks for the reply...
>
> However, one of the benefits of SQL Server's GUID type
> is that it is stored internally as a 128-bit number.
You simply need a set of UDFs to convert a hex representation
to/from the 128-bit number (maybe in a char(16) without
a character set applied, or so. I think there's no 128-bit integer
in firebird, is there?).
> Storing it as a hexadecimal character field willI think the char(16) version should work reasonably fast, too.
> require at least 32 characters and if you want to
> store it in the typical GUID form you need 38
> characters. The nice thing about SQL Server's support
> is that you simply insert the GUID as if it is a
> string and it will be converted to the 128-bit number
> internally automatically. This would be very useful
> in Firebird. It'll be much more efficient as well
> (using less than half the bytes) than the alternatives
> - much better for indexing as well.
If there *is* a 128-bit integer in FB, it should be about the
same with some GUID-conversion UDFs.
Bye,
Daniel
--
eat(this); // delicious suicide