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

From: <compdb_at_hotmail.com>
Date: Wed, 28 Aug 2013 15:20:44 -0700 (PDT)
Message-ID: <014e2e8a-d1c4-45a9-af53-57fb9ed7b6fa_at_googlegroups.com>


On Monday, August 26, 2013 5:45:15 AM UTC-7, karl.s..._at_o2online.de wrote:
> Only
> internal identity is used for referential integrity.

Karl seems to have a very limited notion of referential integrity, that it is enough to constrain by an id FK. This ignores relevant natural key constraints. He doesn't seem to understand the problem discussed in this thread.

On Monday, March 11, 2013 2:48:45 AM UTC-7, rob..._at_gmail.com wrote:
> clients {client}
> client_orders {client, order}
> client_locations {client, location}
> deliveries {delivery_no, client, order, location}
>
> Now add surrogate keys to all relations, and replace the last one with:
> deliveries {delivery_no, order_id, location_id}
>
> You may see that client attribute is no longer needed since it can be determined from either order_id or location_id. However this design no longer enforce the rule that the order and the location should refer to the same client.

philip Received on Thu Aug 29 2013 - 00:20:44 CEST

Original text of this message