Re: On Update Casecade

From: Van Messner <vmessner_at_bestweb.net>
Date: Sun, 26 Aug 2001 15:12:48 GMT
Message-ID: <Ql8i7.259$0y.133688_at_monger.newsread.com>


The link Connor gave you is the best bet for changing the "child" tables. But also think about why you need to update the primary key on the parent table. Does it have meaning? Is this a good idea for your primary key? And do you really want to update it, or would adding a new row be better?

For example, in a table of countries having the primary key be country_name would be fine. It would save you a join to the countries table every time you wanted to use a country name anywhere else. And there are only around 250 countries and key values like "France" have a clear meaning to everyone in the world. But when the country "Soviet Union" becomes "Russia" and several others what kinds of changes do you really want? Do you want to change "Soviet Union" to "Russia"? Or do you want to keep the "Soviet Union" row and add new rows for "Russia", "Ukraine", "Kazakstan", "Kyrgyzstan" etc. The answer will depend on how you use the database and whether an historical record is necessary or whether you have queries which need to find out how things were in 1989 and so on.

"Connor McDonald" <connor_mcdonald_at_yahoo.com> wrote in message news:3B83EC42.4F54_at_yahoo.com...
> Duraiswamy wrote:
> >
> > Hi,
> > How to write on-update-cascade constraint in oracle. My requirement is
to
> > update the value in primary key column of a table which is having
references
> > to many child tables. These child tables to be updated immediately after
> > updating the parent table.
> >
> > Thanks in advance
> > Duraiswamy
>
> http://osi.oracle.com/~tkyte/update_cascade/index.html
>
> hth
> connor
> --
> ==============================
> Connor McDonald
>
> http://www.oracledba.co.uk
>
> "Some days you're the pigeon, some days you're the statue..."
Received on Sun Aug 26 2001 - 17:12:48 CEST

Original text of this message