gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Bootstrapping data - permissions, latin vs unicode, o


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Bootstrapping data - permissions, latin vs unicode, other
Date: Tue, 4 Jan 2011 21:20:49 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Tue, Jan 04, 2011 at 11:43:27AM -0800, Jim Busser wrote:

> Given that the table
> 
>       ref.consumable_substance
> 
> has uniqueness constraints on it, is it appropriate to try
> to add records and rely on the constraint to prevent
> duplicates?

Sure, the constraint will prevent duplicates.

But one will have to deal with the situation that arises
from that: The ongoing transaction will fail (that's the
whole point of the constraint) and everything done within
that transaction will be rolled back (that's how databases
are supposed to work, and real databases do).

That still leaves handling those records that already exist
and need updating (or at least checking for changes).

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346



reply via email to

[Prev in Thread] Current Thread [Next in Thread]