Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle NULL vs '' revisited

Re: Oracle NULL vs '' revisited

From: Shakespeare <whatsin_at_xs4all.nl>
Date: Fri, 31 Aug 2007 22:48:16 +0200
Message-ID: <46d87ea1$0$239$e4fe514c@news.xs4all.nl>

"Tony Rogerson" <tonyrogerson_at_torver.net> schreef in bericht news:fb6ugc$hq6$1$8300dec7_at_news.demon.co.uk...
>> No. If the key changes, it is a new book! Keys can not change! (Want a
>> new car? Get a new licence plate!)
>
> So, a membership database - my user group (sqlserverfaq.com) for instance;
> I only capture this information because it's all I need and by law in the
> UK I can only capture what I need...
>
> Full Name
> Email Address
> Company
> Country of residence
>
> What's the natural key?
>
> Email Address is unique at a point in time.
>
> Are you trying to tell me email address does not change? What happens when
> you move companies? You'd want to update your email address, in your data
> model you aren't allowed to do that so I guess you can't use Oracle.
>
> What I do to get round this problem is to create a surrogate key - an auto
> generating number, that is fixed and never changes.
>
> The natural key is still email address.
>
> What is your solution? Is it an artifical key? But, why? The natural key
> (email) can only be unique, you cannot have two members with the same
> email address.
>
> Or, would you create a composite key of start_date, end_date,
> email_address? Wow, the whole world suddenly gets more complicated then it
> needs to be.
>
> --
> Tony Rogerson, SQL Server MVP
> http://sqlblogcasts.com/blogs/tonyrogerson
> [Ramblings from the field from a SQL consultant]
> http://sqlserverfaq.com
> [UK SQL User Community]
>
>

Hope you did not miss the ironic character of my answer ....

Shakespeare Received on Fri Aug 31 2007 - 15:48:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US