----- Original Message -----
From: "david sims" <[EMAIL PROTECTED]>
> Granted, 63 or 127 bits go a *very* *long* way, but still, it seems
> shortsighted since in the coming centuries, it seems possible that we may
have
> software running for hundreds of years at a time.
I'm using a char(40) to hold my unique ids. The actual generation of the UID
is database specific (Sybase), and I contend that a persistence mechanism
must be involved in order to get a truly unique id. I'm also employing Scott
Ambler's (i'm sure the original inventor is credited somewhere, Scott
recently wrote a quality article about the technique) High-Low technique,
which forces me to access the database once per 10,000 keys generated.
I take the generated sequence number and create an SHA hash. This gives me a
wonderfully cryptic UID that I can use as a PK in my database, or a session
id for a cookie. I'm somewhat guaranteed that a viewer of the hash won't be
able to reverse engineer the value to get the original sequence.
jim
Bibliography:
Scott Ambler's "Enterprise-Ready Object IDs", Software Development 12/99
http://www.sdmagazine.com/uml/thinking/s9912to.shtml
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".