3 ms·
The primary key serves a database function, and its data type should be optimized to suit that function. If you need an enumeration resistant id for public use,
by meepmorp 6y ago
The primary key serves a database function, and its data type should be optimized to suit that function. If you need an enumeration resistant id for public use, a uuid is a great idea, but it's a mistake to make the primary key in a database do double duty as a public identifier and impose inappropriate constraints on it as a consequence.