| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Abstract identifiers, logical pointers, or foreign keys considered not enough
Lauri Pietarinen wrote:
> Costin Cozianu <c_cozianu_at_hotmail.com> wrote in message news:<bm6o4c$j8uu5$1_at_ID-152540.news.uni-berlin.de>... >
> > > In my mind the rational for using surrogates in databases is that > they insulate us from cascading changes in the case that we have to > change the primary key. >
But this is a physical level concern. The table holding the foreign key, may just physically hold a pointer to the record from where it will get the (foreign key/candidate key)value. Then an "ON UPDATE CASCADE" will be just as easy as if there was nothing to cascade.
Plus the scenario you described is not quite kosher. In general you don;t allow users to update the logical identifier of an entity. For example he mistype his license number, so you want to update that information in all different tables.
But business wise this is not always allowable, what if, for example that license ended up in a different table, and was validated and produced business consequences ? Like it was printed on a legal document, or the guy just got a better insurance rate on the license number of his friend, after which he "corrected" it. So it is nto always that we want ON UPDATE CASCADE.
Regardless of the problem related to changing the identity of entities, in the case I presented, introducing a PAYMENT_ID is a strange way to plumb the inadequacy of a type system.
Costin Received on Sat Oct 11 2003 - 21:42:25 CDT
![]() |
![]() |