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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Create Table question

Re: Create Table question

From: Gene Plagge <gplagge_at_hotmail.com>
Date: Wed, 11 Nov 1998 15:29:40 -1000
Message-ID: <F42CB9DBDC42D211B39F00AA00AF3282022273EA@Keiki.Hpu.Edu>


Hi, Teresa,

Oracle doesn't support an "on update cascade" feature in it's foreign key constraints. This is mainly because Oracle assumes that we DBA's are going to design normalized tables using primary keys that are not going to be updated.

In your case, that means that your COURSE table should have a primary key that is not going to be modified; for instance, course_id. The SECTION table should reference that non-modifiable field in its foreign key. Updates made in the COURSE table would be to the other fields, and updating the SECTION table's course_id would not be necessary.

Hope this helps,

Gene Plagge

Teresa Mah wrote in message <364367C4.26DCB9C2_at_home.com>...
>Hi,
>
>I'm having problems with the following create table statement:
>
>create table section
>( dept char(4) not null,
> . . .
> foreign key (dept, course#) references course
> on delete cascade
> on update cascade )
>
>The system allows me to write one "on" clause, but not both. For
>example, I can do "on delete cascade" only, but not "on delete cascade
>on update cascade".
>
>Does anyone know the right syntax for specifying multiple actions?
>
>Thank you very much. Your help would be greatly appreciated.
>
>Teresa
Received on Wed Nov 11 1998 - 19:29:40 CST

Original text of this message

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