Re: Surrogate primary key plus unique constraint vs. natural primary key: data integrity?

From: <karl.scheurer_at_o2online.de>
Date: Wed, 21 Aug 2013 07:03:30 -0700 (PDT)
Message-ID: <f6f6dcb4-e300-4bf5-9aaf-abf836949030_at_googlegroups.com>


Am Freitag, 8. März 2013 20:22:33 UTC+1 schrieb Wolfgang Keller:
>
>
>
> Or could anyone give an example where the approach of using a surrogate
>
> primary key together with a unique constraint on the natural key would
>
> "break" data integrity (especially referential integrity) which could be
>
> avoided by using a natural (composite) primary key?
>
>
>

Hello Wolfgang,

I am a engineer too and develop applications for work preparation in plant inspection and maintainance. In our field of work unique surrogate keys never violate referential integrity. On the contrary we had to migrate from natural (composite) keys to Guids (surrogate keys with guaranteed uniqueness) for referential integrity in complex structured data (moving subsystems with all components from one system to another).

The advantage of surrogate keys is, they will be created, but never changed. Changing the identification of entities never affects the referential integrity between entities. Using natural keys for linking of entities results in massive updates.

Hope this is useful

m.f.G.
Karl Scheurer Received on Wed Aug 21 2013 - 16:03:30 CEST

Original text of this message