Subject Re: [firebird-support] Re: Primary Keys - [was] Database File Size
Author Daniel Rail
Hi,

At May 25, 2004, 09:46, Alan McDonald wrote:


> 4. Node IDs when no IEEE 802 network card is available

> If a system wants to generate UUIDs but has no IEE 802 compliant
> network card or other source of IEEE 802 addresses, then this section
> describes how to generate one.

> The ideal solution is to obtain a 47 bit cryptographic quality random
> number, and use it as the low 47 bits of the node ID, with the most
> significant bit of the first octet of the node ID set to 1. This bit
> is the unicast/multicast bit, which will never be set in IEEE 802
> addresses obtained from network cards; hence, there can never be a
> conflict between UUIDs generated by machines with and without network
> cards.
> So NIC or no NIC - UUIDs are supposed to be unique

As you said "supposed to be unique". Although, after reading the all
the text associated with the above text(section 4), there is still a
possibility of duplication, although minimal, between 2 computers that
don't have a network card, depending on the algorithm and system data
used to generate the GUID. So, I would be more inclined to say 99%
uniqueness, rather than saying 100% uniqueness.

And, here is some documentation from Microsoft's 2003 Platform SDK:

[Start quote...]
In Windows NT 4.0, Windows 95, DCOM release, and Windows 98,
UuidCreate returns RPC_S_UUID_LOCAL_ONLY when the originating computer
does not have an ethernet/token ring (IEEE 802.x) address. In this
case, the generated UUID is a valid identifier, and is guaranteed to
be unique among all UUIDs generated on the computer. However, the
possibility exists that another computer without an ethernet/token
ring address generated the identical UUID. Therefore you should never
use this UUID to identify an object that is not strictly local to your
computer. Computers with ethernet/token ring addresses generate UUIDs
that are guaranteed to be globally unique.
[...End quote]

--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)