UUID (Universally Unique Identifier)

A UUID is a 128-bit identifier designed to be globally unique without a central authority, often used as a primary key in distributed systems.

UUIDs let independent systems generate IDs that won't collide, which is handy for distributed apps, client-generated keys, and merging data from multiple sources.

Compared to sequential integer keys, UUIDs don't leak row counts and can be created offline, but they're larger and less index-friendly; newer time-ordered variants improve locality.

PostgreSQL supports UUIDs natively as a type and can generate them, making them a practical primary-key choice for many schemas.

Related terms

See it in practice

Kolaybase gives you PostgreSQL, auth, storage, and a REST API in minutes.

Get started