Re: Enforce primary key on every table during dev?

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Tim Cross <theophilusx@gmail.com>
Cc: Ron Johnson <ron.l.johnson@cox.net>, "pgsql-generallists.postgresql.org" <pgsql-general@lists.postgresql.org>
Date: 2018-03-01T21:21:41Z
Lists: pgsql-general
On Thu, Mar 1, 2018 at 2:06 PM, Tim Cross <theophilusx@gmail.com> wrote:

> +1. And a good test of your underlying data model is whether you can
> identify a natural primary key. If you can't, chances are your model is
> immature/flawed and needs more analysis.
>

​https://en.wikipedia.org/wiki/All_models_are_wrong

Unfortunately identifying a natural primary key doesn't guarantee that
one's model is mature, unblemished, and complete - the model writer may
just not know what they don't know.  But they may know enough, or the
application is constrained enough, for it to be useful anyway.

David J.