Subject | Re: [ib-support] OID: Double or String? |
---|---|
Author | Guillermo Najar-Arreola |
Post date | 2002-08-28T21:30:06Z |
Thank you Ann
""Ann W. Harrison"" <aharrison@...> wrote in message
news:5.1.0.14.2.20020828165538.047006e8@......
""Ann W. Harrison"" <aharrison@...> wrote in message
news:5.1.0.14.2.20020828165538.047006e8@......
> At 03:22 PM 8/28/2002 -0500, Guillermo Najar-Arreola wrote:that
>
> >I'm planning how am I going to implement OIDs for any of my apps using
> >Firebird. I was thinking on strings since I have customers with laptops
> >download their information to a central server and I want to prefix theOID
> >comming from each computer so I don't have conflicts with OIDs generatedin
> >the central server. For Interbase, what data type is more efficient for
> >primary keys ? double or string?
>
> Object identifiers can be implemented in several ways. The best, in my
> opinion, is to create a compound key. The first part of the key is the
> computer id, something that you assign and store in an integer field. The
> second part of the key is a value created by gen-id on each system and
> stored in an eight byte integer field. Because Firebird uses prefix
> compression on indexes, the initial "computer id" part of the key will
> almost never be stored and will have no measurable effect on index size.
>
> Eight byte integer - aka numeric (18,0) - is the best choice for an index
> key type in general because it's precise and dense. Firebird manipulates
> the keys it receives so they can be compared bytewise - inverting bytes
> and performing unnatural acts on floating point numbers. The stored key
> has both prefix compression and suffix compression. Suffix compression
> is applied to each part of a compound key. As a result, the stored key
> values vary in size...
>
>
> Regards,
>
> Ann
> www.ibphoenix.com
> We have answers.
>
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>