Universally unique identifier

A __universally unique identifier__ (UUID) is a 128-bit number used to identify information in computer systems. The term __globally unique identifier__ (GUID) is also used - wikipedia

The probability to find a duplicate within 103 trillion version 4 UUIDs is one in a billion.

wikipedia

# Node.js

npm install uuid var uuid = require('uuid'); Then create some ids ... const uuidv1 = require('uuid/v1');uuidv1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' const uuidv4 = require('uuid/v4');uuidv4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'

- https://github.com/broofa/node-uuid - https://www.npmjs.com/package/uuid

# Uniqueness

When generated according to the standard methods, UUIDs are for practical purposes unique, without depending for their uniqueness on a central registration authority or coordination between the parties generating them, unlike most other numbering schemes. While the probability that a UUID will be duplicated is not zero, it is close enough to zero to be negligible.

Thus, anyone can create a UUID and use it to identify something with near certainty that the identifier does not duplicate one that has already been, or will be, created to identify something else. Information labeled with UUIDs by independent parties can therefore be later combined into a single database, or transmitted on the same channel, with a negligible probability of duplication.

Adoption of UUIDs and GUIDs is widespread, with many computing platforms providing support for generating them, and for parsing their textual representation.

# Format

In its canonical textual representation, the sixteen octets of a UUID are represented as 32 hexadecimal digits, displayed in five groups separated by hyphens.

123e4567-e89b-12d3-a456-426655440000

The 36 characters (32 alphanumeric and four hyphens) are arranged in the form `8-4-4-4-12` - wikipedia

RFC 4122 section 3 requires that the characters to be generated in lower case, while being case insensitive on input, though some commonly-used implementations violate this rule- rfc

# Uses

Significant uses include ext2/ext3/ext4 filesystem userspace tools (e2fsprogs uses libuuid provided by util-linux), LUKS encrypted partitions, GNOME, KDE, and macOS, most of which are derived from the original implementation by Theodore Ts'o - wikipedia

One of the uses of UUIDs in Solaris (operating system) (using Open Software Foundation implementation) is identification of a running operating system instance for the purpose of pairing crash dump data with Fault Management Event in the case of kernel panic.

# As database keys

UUIDs are commonly used as a unique key in database tables. The function, which generates standard version 1 UUIDs - wikipedia

The random nature of standard version 3, 4, and 5 UUIDs and the ordering of the fields within standard version 1 and 2 UUIDs may create problems with database locality of reference or performance when UUIDs are used as primary keys.

For example, in 2002 Jimmy Nilsson reported a significant improvement in performance with Microsoft SQL Server when the version 4 UUIDs being used as keys were modified to include a non-random suffix based on system time.

This so-called "COMB" (combined time-GUID) approach made the UUIDs non-standard and significantly more likely to be duplicated, as Nilsson acknowledged, but Nilsson only required uniqueness within the application.

# Tools Search for free culture images for this page on google

# Sections

# See also