Subject Re: [Firebird-Architect] GUID Key Fields
Author Alexandre Benson Smith
Hi Kevin,

Kevin Berry wrote:

>Ann,
>
>All that is needed in Firebird is support for a
>128-bit number native type and a way to automatically
>convert those numbers from the UUID/GUID format into
>the 128-bit numbers. I believe that shouldn't be hard
>to accomplish even for a group of "volunteers." If
>that type is called "uniqueidentifier" then this will
>make it compatible with Microsoft's SQL Server. I'll
>be quite happy to perform testing for you if someone
>will implement this type.
>
>Internally Firebird would treat this as a 128-bit
>number. Externally (i.e. through SQL) it would treat
>it as a 38-byte character field.
>
>The uniqueness of the UUID is irrelevant to the
>Firebird implementation. Leave this up to the
>developers who use Firebird to resolve.
>
>BTW, I'm sure this would help you to convert some SQL
>Server developers into Firebird developers. :-)
>Without supporting uniqueidentifier it is quite a bit
>harder to port SQL Server apps to Firebird.
>
>Cheers,
>Kevin.
>
>
I disagree that the hardest part of a migration from MSSQL to FB will be
the unique identifiers, what about the triggers and procedures ?

If you create a domain called uniqueidentifier as char(38) and a before
insert trigger for each table will make the "same". Don't look so much
work for me, you could even create an SP that walks the RDB$Relations
table and create the triggers automagically, or generate a script as output.

I think a "native" support for UUID will be good, but looks like low
priority for me, since one can have alternative approachs that achieve
the same.

If native suporte will be added to FB, your idea of a 128 bit internal
storage and a 38 char SQL representantion/conversion will be good.

see you !

--

Alexandre Benson Smith
Development
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.8.1 - Release Date: 23/03/2005