dbTalk Databases Forums  

Exists foreign key "on update cascade"

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Exists foreign key "on update cascade" in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Norbert Winkler
 
Posts: n/a

Default Exists foreign key "on update cascade" - 02-25-2008 , 08:50 AM






Hi,

google says no, and my SQL-reference I have doesn't mention it.
Thats why the question:

In other DBs it is possible to define a foreign key with
"ON UPDATE CASCADE"
what means: I change a (primary-)key-value in the master-table and all
foreign-key-values in detail-tables are changed accordingly.
Is there any oracle-version that does it.
I only found:
ON DELETE/UPDATE NO ACTION, ON DELETE CASCADE und ON DELETE SET NULL



--
Norbert

Reply With Quote
  #2  
Old   
Charles Hooper
 
Posts: n/a

Default Re: Exists foreign key "on update cascade" - 02-25-2008 , 11:03 AM






On Feb 25, 9:50*am, Norbert Winkler <Norbert.Winkl... (AT) gmx (DOT) de> wrote:
Quote:
Hi,

google says no, and my SQL-reference I have doesn't mention it.
Thats why the question:

In other DBs it is possible to define a foreign key with
"ON UPDATE CASCADE"
what means: I change a (primary-)key-value in the master-table and all
foreign-key-values in detail-tables are changed accordingly.
Is there any oracle-version that does it.
I only found:
ON DELETE/UPDATE NO ACTION, ON DELETE CASCADE und ON DELETE SET NULL

--
Norbert
By convention, primary key values should never be changed. Updating a
primary key (even with the same value) will cause a full table lock on
the foreign tables that reference the primary key unless an index is
created on those columns in the foreign tables.

You might try the following Google search:
"cascade update" primary key oracle

A couple links returned that might be helpful:
http://asktom.oracle.com/tkyte/updat...ade/index.html
http://download.oracle.com/docs/html/B10255_01/b.htm

Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc.


Reply With Quote
  #3  
Old   
Charles Hooper
 
Posts: n/a

Default Re: Exists foreign key "on update cascade" - 02-25-2008 , 11:03 AM



On Feb 25, 9:50*am, Norbert Winkler <Norbert.Winkl... (AT) gmx (DOT) de> wrote:
Quote:
Hi,

google says no, and my SQL-reference I have doesn't mention it.
Thats why the question:

In other DBs it is possible to define a foreign key with
"ON UPDATE CASCADE"
what means: I change a (primary-)key-value in the master-table and all
foreign-key-values in detail-tables are changed accordingly.
Is there any oracle-version that does it.
I only found:
ON DELETE/UPDATE NO ACTION, ON DELETE CASCADE und ON DELETE SET NULL

--
Norbert
By convention, primary key values should never be changed. Updating a
primary key (even with the same value) will cause a full table lock on
the foreign tables that reference the primary key unless an index is
created on those columns in the foreign tables.

You might try the following Google search:
"cascade update" primary key oracle

A couple links returned that might be helpful:
http://asktom.oracle.com/tkyte/updat...ade/index.html
http://download.oracle.com/docs/html/B10255_01/b.htm

Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc.


Reply With Quote
  #4  
Old   
Charles Hooper
 
Posts: n/a

Default Re: Exists foreign key "on update cascade" - 02-25-2008 , 11:03 AM



On Feb 25, 9:50*am, Norbert Winkler <Norbert.Winkl... (AT) gmx (DOT) de> wrote:
Quote:
Hi,

google says no, and my SQL-reference I have doesn't mention it.
Thats why the question:

In other DBs it is possible to define a foreign key with
"ON UPDATE CASCADE"
what means: I change a (primary-)key-value in the master-table and all
foreign-key-values in detail-tables are changed accordingly.
Is there any oracle-version that does it.
I only found:
ON DELETE/UPDATE NO ACTION, ON DELETE CASCADE und ON DELETE SET NULL

--
Norbert
By convention, primary key values should never be changed. Updating a
primary key (even with the same value) will cause a full table lock on
the foreign tables that reference the primary key unless an index is
created on those columns in the foreign tables.

You might try the following Google search:
"cascade update" primary key oracle

A couple links returned that might be helpful:
http://asktom.oracle.com/tkyte/updat...ade/index.html
http://download.oracle.com/docs/html/B10255_01/b.htm

Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc.


Reply With Quote
  #5  
Old   
Charles Hooper
 
Posts: n/a

Default Re: Exists foreign key "on update cascade" - 02-25-2008 , 11:03 AM



On Feb 25, 9:50*am, Norbert Winkler <Norbert.Winkl... (AT) gmx (DOT) de> wrote:
Quote:
Hi,

google says no, and my SQL-reference I have doesn't mention it.
Thats why the question:

In other DBs it is possible to define a foreign key with
"ON UPDATE CASCADE"
what means: I change a (primary-)key-value in the master-table and all
foreign-key-values in detail-tables are changed accordingly.
Is there any oracle-version that does it.
I only found:
ON DELETE/UPDATE NO ACTION, ON DELETE CASCADE und ON DELETE SET NULL

--
Norbert
By convention, primary key values should never be changed. Updating a
primary key (even with the same value) will cause a full table lock on
the foreign tables that reference the primary key unless an index is
created on those columns in the foreign tables.

You might try the following Google search:
"cascade update" primary key oracle

A couple links returned that might be helpful:
http://asktom.oracle.com/tkyte/updat...ade/index.html
http://download.oracle.com/docs/html/B10255_01/b.htm

Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc.


Reply With Quote
  #6  
Old   
sybrandb@hccnet.nl
 
Posts: n/a

Default Re: Exists foreign key "on update cascade" - 02-25-2008 , 03:41 PM



On Mon, 25 Feb 2008 15:50:26 +0100, Norbert Winkler
<Norbert.Winkler1 (AT) gmx (DOT) de> wrote:

Quote:
Hi,

google says no, and my SQL-reference I have doesn't mention it.
Thats why the question:

In other DBs it is possible to define a foreign key with
"ON UPDATE CASCADE"
what means: I change a (primary-)key-value in the master-table and all
foreign-key-values in detail-tables are changed accordingly.
Is there any oracle-version that does it.
I only found:
ON DELETE/UPDATE NO ACTION, ON DELETE CASCADE und ON DELETE SET NULL
There is not.
However on http://asktom.oracle.com you will find a stored procedure
which does the trick. Search for 'cascade update'. The procedure will,
IIRC, generate the required triggers from the constraints.

--
Sybrand Bakker
Senior Oracle DBA


Reply With Quote
  #7  
Old   
sybrandb@hccnet.nl
 
Posts: n/a

Default Re: Exists foreign key "on update cascade" - 02-25-2008 , 03:41 PM



On Mon, 25 Feb 2008 15:50:26 +0100, Norbert Winkler
<Norbert.Winkler1 (AT) gmx (DOT) de> wrote:

Quote:
Hi,

google says no, and my SQL-reference I have doesn't mention it.
Thats why the question:

In other DBs it is possible to define a foreign key with
"ON UPDATE CASCADE"
what means: I change a (primary-)key-value in the master-table and all
foreign-key-values in detail-tables are changed accordingly.
Is there any oracle-version that does it.
I only found:
ON DELETE/UPDATE NO ACTION, ON DELETE CASCADE und ON DELETE SET NULL
There is not.
However on http://asktom.oracle.com you will find a stored procedure
which does the trick. Search for 'cascade update'. The procedure will,
IIRC, generate the required triggers from the constraints.

--
Sybrand Bakker
Senior Oracle DBA


Reply With Quote
  #8  
Old   
sybrandb@hccnet.nl
 
Posts: n/a

Default Re: Exists foreign key "on update cascade" - 02-25-2008 , 03:41 PM



On Mon, 25 Feb 2008 15:50:26 +0100, Norbert Winkler
<Norbert.Winkler1 (AT) gmx (DOT) de> wrote:

Quote:
Hi,

google says no, and my SQL-reference I have doesn't mention it.
Thats why the question:

In other DBs it is possible to define a foreign key with
"ON UPDATE CASCADE"
what means: I change a (primary-)key-value in the master-table and all
foreign-key-values in detail-tables are changed accordingly.
Is there any oracle-version that does it.
I only found:
ON DELETE/UPDATE NO ACTION, ON DELETE CASCADE und ON DELETE SET NULL
There is not.
However on http://asktom.oracle.com you will find a stored procedure
which does the trick. Search for 'cascade update'. The procedure will,
IIRC, generate the required triggers from the constraints.

--
Sybrand Bakker
Senior Oracle DBA


Reply With Quote
  #9  
Old   
sybrandb@hccnet.nl
 
Posts: n/a

Default Re: Exists foreign key "on update cascade" - 02-25-2008 , 03:41 PM



On Mon, 25 Feb 2008 15:50:26 +0100, Norbert Winkler
<Norbert.Winkler1 (AT) gmx (DOT) de> wrote:

Quote:
Hi,

google says no, and my SQL-reference I have doesn't mention it.
Thats why the question:

In other DBs it is possible to define a foreign key with
"ON UPDATE CASCADE"
what means: I change a (primary-)key-value in the master-table and all
foreign-key-values in detail-tables are changed accordingly.
Is there any oracle-version that does it.
I only found:
ON DELETE/UPDATE NO ACTION, ON DELETE CASCADE und ON DELETE SET NULL
There is not.
However on http://asktom.oracle.com you will find a stored procedure
which does the trick. Search for 'cascade update'. The procedure will,
IIRC, generate the required triggers from the constraints.

--
Sybrand Bakker
Senior Oracle DBA


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.