Re: Enforce primary key on every table during dev?
Rakesh Kumar <rakeshkumar464@aol.com>
From: Rakesh Kumar <rakeshkumar464@aol.com>
To: Daevor The Devoted <dollien@gmail.com>
Cc: haramrae@gmail.com,
melvin6925@gmail.com,
theophilusx@gmail.com,
finzelj@gmail.com,
pgsql-general <pgsql-general@postgresql.org>
Date: 2018-03-01T20:37:46Z
Lists: pgsql-general
> On Mar 1, 2018, at 12:47 , Daevor The Devoted <dollien@gmail.com> wrote: > > > I was always of the opinion that a mandatory surrogate key (as you describe) is good practice. > Sure there may be a unique key according to business logic (which may be consist of those > "ungainly" multiple columns), but guess what, business logic changes, and then you're screwed! > So using a primary key whose sole purpose is to be a primary key makes perfect sense to me. I did not get your point. Can you explain why a change of business logic makes it difficult to change existing rows with surrogate key. thanks.