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

From Ron Johnson
Subject Re: Enforce primary key on every table during dev?
Date
Msg-id 796df4ca-62b8-c574-6b1b-742aa401250a@cox.net
Whole thread Raw
In response to Re: Enforce primary key on every table during dev?  (Alban Hertroys <haramrae@gmail.com>)
Responses Re: Enforce primary key on every table during dev?  (marcelo <marcelo.nicolet@gmail.com>)
Re: Enforce primary key on every table during dev?  (Tim Cross <theophilusx@gmail.com>)
List pgsql-general
On 03/01/2018 02:08 PM, marcelo wrote:
>
>
> On 01/03/2018 16:42 , Ron Johnson wrote:
>> On 03/01/2018 01:11 PM, marcelo wrote:
>>>
>>> On 01/03/2018 16:00 , Ron Johnson wrote:
>> [snip]
>>>> If your only unique index is a synthetic key, then you can insert the 
>>>> same "business data" multiple times with different synthetic keys.
>>>>
>>>>
>>>> -- 
>>>> Angular momentum makes the world go 'round.
>>> IMHO, business logic can and must preclude "garbage insertion". Except 
>>> you are inserting data directly to database using SQL, any n-tier 
>>> architecture will be checking data validity.
>>
>> Any n-tier architecture that's bug-free.
>>
> Do you know about unit testing?

Way Back When Dinosaurs Still Roamed The Earth and I first learned the 
trade, the focus was on proper design instead of throwing crud against the 
wall and hoping tests caught any bugs.  Because, of course, unit tests are 
only as good as you imagination in devising tests.


-- 
Angular momentum makes the world go 'round.


pgsql-general by date:

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