UUID (Universally Unique Identifier)
What is UUID (Universally Unique Identifier)?
UUID (Universally Unique Identifier): A 128-bit identifier that is statistically guaranteed to be unique. Used for IDs in distributed systems where a central authority cannot assign sequential IDs. A UUID, Universally Unique Identifier, is a 128-bit identifier such as 550e8400-e29b-41d4-a716-446655440000. It can be generated anywhere, by any server or device, with practically no chance of two being the same.
Frequently asked questions about UUID (Universally Unique Identifier)
How is UUID (Universally Unique Identifier) used in practice?
That makes UUIDs useful in distributed systems, for offline apps that create records before syncing, and for public URLs where you do not want to reveal how many orders or customers you have, as sequential IDs do.
What should you keep in mind with UUID (Universally Unique Identifier)?
They have costs. They are longer and less readable than numbers, and random UUIDs (version 4) scatter inserts across the database index, which slows down large tables. Version 7 UUIDs and ULIDs solve that by starting with a timestamp, so new values sort in order. Laravel supports both through HasUuids and HasUlids on models.
At a glance
| Category | Core glossary |
|---|---|
| Explained by | Reinier de la Parra |
| Updated |