Subject RE: [firebird-support] Re: Primary Key - GUID
Author Alan McDonald
> Just want to make sure there is no integer data type in Firebird 1.5
> to store the integer equivalent of GUID?

no

>
> If no, I need to use the GUID as string to store as primary key. Yes,
> my application is a sort of distributed system, ie. embedded server on
> client machines.
>
> I will generate the GUID in my application, ie. Delphi. How do I store
> the GUID as CHAR(22) ?
>

did you read the response in this message?

>
>
> --- In firebird-support@yahoogroups.com, Pavel Menshchikov
> <developer@l...> wrote:
> >
> > [repost]
> > Hello,
> >
> > a> I would like to use the GUID as primary key field.
> > a> However, the BIGINT is 64 bit and it cannot be used to store GUID.
> > a> What alternative data type can I use to store the GUID?
> > a> If say, define the primary fieled as VARCHAR(38), is the index wide
> > a> enough to do sorting or searching ?
> >
> > As Adam said, use CHAR. To generate GUIDs you need a UDF (uuidlib, for
> > example). Note that "compact" form of a GUID (UUID, which could be
> > saved as CHAR(22)) is more suitable/efficient for indexing in FB than
> > a "regular" form of a GUID (which could be saved as CHAR(36) excluding
> > brackets).
> >
> >
> > --
> > Best regards,
> > Pavel Menshchikov
> > http://www.ls-software.com
> >
>
>
>
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>