Re: Defining functional dependency constraints

From: Neil <neil_at_nospam.com>
Date: Tue, 19 Feb 2002 19:43:08 -0000
Message-ID: <iVxc8.83751$as2.14110005_at_news6-win.server.ntlworld.com>


Yash,
Functional dependencies like these are normally removed as part of the normalisation process as they are not considered 'a good thing'. As Daniel said, if you really want to do this type of thing then triggers are the way to go.

Neil

"Yash" <yash_ganthe_at_hotmail.com> wrote in message news:a4t3al$b9s$1_at_news.vsnl.net.in...
> Hi,
>
> I created a table using
> create table myTable(id number, name varchar2(20), ind number, cd
> varchar2(20)) ;
>
> I made id, the primary key. I want to define a constraint by which for the
> same value of ind, the value for cd will be the same. , i.e. ,
> 1,"hello",5,"Washington"
> 1,"hi",5,"London"
> will be invalid.
>
> In pure database concepts, such a constraint is called a functional
> dependency. They write it as ind->cd and read as ind functionally
determines
> cd. I have not been able to figure out a way to define this constraint in
> Oracle.
> Any help will be appreciated.
>
> Thanks
>
>
Received on Tue Feb 19 2002 - 20:43:08 CET

Original text of this message