UUIDs: identify records across applications and data sources
UUIDs help applications create identifiers before contacting a central database and bring together records from several sources. Understand their role in record identity, then handle creation order, access control and duplicate operations separately.
The version determines what an identifier tells you
ToolRoof generates version 4 UUIDs. This version is randomly constructed, not a timestamp from which you can recover a creation date.
The familiar form has 32 hexadecimal digits and 4 hyphens. Version and variant bits leave 122 random bits within the 128-bit value; the visible character count is not a count of random digits.
References: RFC 9562 — UUID version 4
Create the identity once, then keep it
A record needs a stable identity. Generating a new UUID on every edit makes the same record harder to track, and sorting v4 UUIDs as text does not sort records by creation time.
Likewise, changing an identifier when retrying an operation may make it look like a new operation. Preventing duplicate work is a separate design decision from choosing a UUID format.
A low collision probability is not authorization
Good random identifiers reduce the chance of a duplicate; they do not prove collisions impossible. Enforce uniqueness where records are stored when consistency requires it.
Knowing an identifier should not automatically authorize reading or changing its record. UUIDs do not replace permission checks, and copying an illustrative identifier from an article does not create a unique one for you.
References: RFC 9562 — UUID version 4
Example: the identity of an inventory item
8c5b7f20-6a91-4f3d-9b62-2e740a1c8d35 illustrates a v4 UUID; it is not reserved for your use. The third group starts with 4, and the whole representation contains 36 characters including hyphens.
Give a real inventory item its own newly generated identifier, then retain it when its name or location changes. Store creation time separately and check the requester’s permissions. The identifier answers “which record?”, not “who may open it?”.