Reading a UUID
The familiar text representation contains 32 hexadecimal digits split into five groups with hyphens. Some bits identify the version and variant. UUID version 4 uses random bits for the rest, leaving 122 bits for randomness after the fixed fields.
550e8400-e29b-41d4-a716-446655440000Choosing a version
Version 4 is suitable when systems want to generate IDs independently of one another. Version 7 includes a Unix-time prefix that makes identifiers sortable by their creation time at millisecond granularity. Select the version based on storage, ordering and disclosure requirements.
Generate identifiers
Generate three v4 UUIDs. The third group always starts with 4, and the fourth starts with 8, 9, a or b. Use a uniqueness constraint if your system must reject duplicate keys. Authorization checks must still protect any records identified by UUIDs.