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

From: Jan Hidders <hidders_at_gmail.com>
Date: Mon, 18 Mar 2013 19:22:02 +0100
Message-ID: <51475b4a$0$604$e4fe514c_at_dreader34.news.xs4all.nl>


On 2013-03-18 10:26:55 +0000, robur.6_at_gmail.com said:

> On Saturday, March 16, 2013 1:27:46 PM UTC+2, Jan Hidders wrote:

>> As in "it's because you are using them you might be misled into> 
>> thinking you don't need composite keys"? Maybe, but what I would like> 
>> to know is if they cause some inherent problems that cannot be 
>> avoided,> even when modelling carefully.

>
> If you never replace a composite by a surrogate then the design should
> be 100% equivalent since there is a 1:1 correspondence between naturals
> and surrogates. In practice some constraints might be more difficult to
> implement since many DBMSs don’t allow foreign keys to views.

Why would we need views for that/ And if we do replace composites by surrogates?

  • Jan Hidders
Received on Mon Mar 18 2013 - 19:22:02 CET

Original text of this message