Re: Enforce primary key on every table during dev?

From: Francisco Olarte <folarte(at)peoplecall(dot)com>
To: Steven Lembark <lembark(at)wrkhors(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Enforce primary key on every table during dev?
Date: 2018-03-01 18:40:43
Message-ID: CA+bJJbw9qNn8Jnzz9Lb9u8g1bQ+5Vg-hcwkiYS5EOUZ+vgb=Dg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Mar 1, 2018 at 5:22 PM, Steven Lembark <lembark(at)wrkhors(dot)com> wrote:
> If you can say that "rows containing the same values are not
> duplicates"

Not a native speaker, but "Rows having the same values" seems to me
the definition of duplicate ( ;-), J.K. )

> then you have a database that cannot be queried, audited,
> or managed effectively. The problem is that you cannot identify the
> rows, and thus cannot select related ones, update them (e.g., to
> expire outdated records), or validate the content against any external
> values (e.g., audit POS tapes using the database).

Good point. All the times I've found myself with complete duplicates
allowed I've alwasy found the correct model is no duplicates + count
field ( with possible splits as you pointed below ). I would not have
a "marbles" table with (red, red, blue, white, red, white), I would
switch it to red=3, blue=1, white=2.

Francisco Olarte.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2018-03-01 18:52:10 Re: Enforce primary key on every table during dev?
Previous Message Francisco Olarte 2018-03-01 18:35:17 Re: Enforce primary key on every table during dev?