Re: Enforce primary key on every table during dev?
От | Francisco Olarte |
---|---|
Тема | Re: Enforce primary key on every table during dev? |
Дата | |
Msg-id | CA+bJJbw9qNn8Jnzz9Lb9u8g1bQ+5Vg-hcwkiYS5EOUZ+vgb=Dg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Enforce primary key on every table during dev? (Steven Lembark <lembark@wrkhors.com>) |
Список | 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 по дате отправления: