Search notes:

UUID GUID

UUID = Universally Unique IDentifier, aka GUID (= Globally Unique IDentifier).
A UUID is 128 bits (= 16 bytes) long and guarantees to be unique in space and time without the need to be centrally registered.

Representation

llllllll-mmmm-Mhhh-Nsss-nnnnnnnnnnnn.
Each letter encodes 4 bits.
l - time low: the low 32 bits of the time.
m - time mid: the middle 16 bits of the time.
h - time high: the high 12 bits of the time
s - (plus 1 to 3 bits of N): Clock sequence
M - indicates UUID version, the one to three most significant bits of N the UUD variant.
n - the 48 bits of the node.

Microsoft Windows

Apparently, Microsoft chose to represent GUIDs with curly braces: {llllllll-mmmm-Mhhh-Nsss-nnnnnnnnnnnn}, for example in the registry.
Also, they apparently used mixed endianness : the first three parts are little-endian and the last two parts are little-endian. The byte array 00, 11, 22, … ff would be represented as: 33221100-5544-7766-8899-aabbccddeeff
Windows uses GUIDs heavily in the realm of COM, for example to identify COM obects (in which case the GUID is called CLSID).
See also the include file <guiddef.h>.

GUIDs as Primary Keys in Databases

Because each GUID is distinct from each other, they lend themselves to be used as primary keys in databases.
In Oracle, a GUID can be created with sys_guid.
Methods to create a GUID in SQL Server are:

Creation of GUIDs

The Windows API provides a few functions to create GUIDs:

See also

RFC 4122
Some known GUIDS
guidgen.exe (%VSxxxCOMNTOOLS%)
The .NET struct System.Guid
The Power Query standard library function Diagnostics.ActivityId().

Links

Waste-A-Guid

Index