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: Defining functional dependency constraints

Re: Defining functional dependency constraints

From: damorgan <dan.morgan_at_ci.seattle.wa.us>
Date: Tue, 19 Feb 2002 17:55:03 GMT
Message-ID: <3C729186.D5FCD56B@ci.seattle.wa.us>


To do this you will need to write a BEFORE-INSERT and BEFORE-UPDATE trigger. This can not be done with a constraint.

Daniel Morgan

Yash wrote:

> 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 - 11:55:03 CST

Original text of this message

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