gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] Uniqueness in dem.lnk_identity2ext_id


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Uniqueness in dem.lnk_identity2ext_id
Date: Thu, 18 Nov 2010 23:34:58 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Thu, Nov 18, 2010 at 02:13:18PM -0800, Jim Busser wrote:

> ***************************************************************************
> dem.identity.pk               id_identity     UNIQUE#1 NOT NULL
> 
>                                               external_id     UNIQUE#1 NOT 
> NULL 
> 
> dem.enum_ext_id_types.pk      fk_origin       UNIQUE#1 NOT NULL 
> ***************************************************************************
> 
> so I just wondered... yes, any one person can have multiple external IDs 
> therefore I understand that dem.identity.pk cannot be required to be unique 
> by itself. I only just wondered about dem.identity.pk being part of the 
> constraint of
> 
>       {external_id, fk_origin}
> 
> being unique, since it allows different persons to have the same
> 
>       {external_id, fk_origin}
> 
> but I then realized that in some cases a single external organization 
> (fk_origin) might re-use the same external_id for multiple persons (maybe an 
> account number used in common by a family). In other cases, the issuer would 
> NOT intend re-use across two different persons.
> 
> Would it work in dem.enum_ext_id_types to add the column
> 
>       isunique
> 
> allowing to constrain the second scenario?

That is technically possible but for the time being I'd like
to consider that an application level concern.

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]