On Tue, Sep 19, 2006 at 10:11:39AM -0400, Andrew Dunstan wrote:
> [EMAIL PROTECTED] wrote:
> >>As others have mentioned, using MAC address doesn't remove the
> >>possibility of a collision.
> >It does, as I control the MAC address. I can choose not to overwrite it.
> >I can choose to ensure that any cases where it is overwritten, it is
> >overwritten with a unique value.
> How do you know somebody else isn't using that MAC value?

Different UUID forms can be unique within their domain. As long as I
control the MAC address assignment for all of my units, my MAC address
can be guaranteed to be unique across space and time, within the
generous range provided by a UUID. My UUIDs may not be unique in your
database, or in your domain, but they will be unique within mine.

If I use a UUID form based upon the MD5 or SHA-1 of a unique URL, there
is a great chance that it is unique. Better than that of a random number
generator, in that I control the URL.

I'm not in favour of the random number based UUID forms, as I believe
I am sacrificing control, thereby allowing for generation to result in
non-unique output. Where it is currently impossible for me to generate
the same UUID (I control the MAC address, time, and the generator uses
the clock sequence), using a random number generator turns the
impossibility into a possibility.

If you don't have control over the MAC address, time, or generator,
then yeah - random number generator might suffice.

Cheers,
mark

-- 
[EMAIL PROTECTED] / [EMAIL PROTECTED] / [EMAIL PROTECTED]     
__________________________
.  .  _  ._  . .   .__    .  . ._. .__ .   . . .__  | Neighbourhood Coder
|\/| |_| |_| |/    |_     |\/|  |  |_  |   |/  |_   | 
|  | | | | \ | \   |__ .  |  | .|. |__ |__ | \ |__  | Ottawa, Ontario, Canada

  One ring to rule them all, one ring to find them, one ring to bring them all
                       and in the darkness bind them...

                           http://mark.mielke.cc/


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to