Re: Enforce primary key on every table during dev? - Mailing list pgsql-general

From Francisco Olarte
Subject Re: Enforce primary key on every table during dev?
Date
Msg-id CA+bJJbw9qNn8Jnzz9Lb9u8g1bQ+5Vg-hcwkiYS5EOUZ+vgb=Dg@mail.gmail.com
Whole thread Raw
In response to Re: Enforce primary key on every table during dev?  (Steven Lembark <lembark@wrkhors.com>)
List pgsql-general
On Thu, Mar 1, 2018 at 5:22 PM, Steven Lembark <lembark@wrkhors.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.


pgsql-general by date:

Previous
From: Francisco Olarte
Date:
Subject: Re: Enforce primary key on every table during dev?
Next
From: "David G. Johnston"
Date:
Subject: Re: Enforce primary key on every table during dev?