News for hackers. Stuff that matters.
Re:Be Careful with UUID or GUID as Primary Keys by dghf on Friday June 09, 2017 @06:04PM (#14524956)
> > secondary primary key

> This is called a "candidate key" in existing literature. much has been written about such things.

To be picky, a "primary primary" key is also a candidate key. A superkey is any set of columns the values of which are guaranteed to be unique in any row in a given table; a candidate key is a minimal superkey (i.e., if you remove any column from the key, you destroy its uniqueness). (Relational purists will want to read "attribute" for "column", "tuple" for "row", and "relation" for "table".)

From a logical perspective, the designation of a candidate key as the primary key is more or less arbitrary; as per this article, that may well not be the case from a physical perspective.

There are no comments on this comment yet.