Re: Surrogate Keys

From: Randy Yates <yates_at_207.87.184.178>
Date: 2000/05/27
Message-ID: <392F539E.E1D93060_at_207.87.184.178>#1/1


Joe Celko wrote:
> [...]
> 2) Redesign the database -- I have never seen a ten column primary key
> in my life.

Perhaps I'm doing something wrong, but I don't really think so. This is a business application where there really are many things contributing to the dependency of certain table data. If you'd like, I can post some details.

> 3) Use a hashing function on those columns to build the surrogate key

Sounds like a great idea, but I'm not sure why. Is it because this way you can retain true functional dependence?

> 4) Generate a random number with a check digit and use it as the key.

You're over my head here. What's a check digit and why would we use this over a plain old autonumbered surrogate key?

> --CELKO--
> Joe Celko, SQL and Database Consultant

Thanks for your help, Joe.

-- 
% Randy Yates                   % "I met someone who looks alot like you,
%% DIGITAL SOUND LABS           %             she does the things you do, 
%%% Digital Audio Sig. Proc.    %                     but she is an IBM."
%%%% <yates_at_ieee.org>           %        'Yours Truly, 2095', *Time*, ELO   
http://207.87.184.178/index.htm
Received on Sat May 27 2000 - 00:00:00 CEST

Original text of this message