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: "ON DELETE CASCADE" references more than one table

Re: "ON DELETE CASCADE" references more than one table

From: Rene Nyffenegger <rene.nyffenegger_at_gmx.ch>
Date: 2 Mar 2003 17:20:33 GMT
Message-ID: <b3teh0$1qf0nb$1@ID-82536.news.dfncis.de>

> Hi All,
>
> I have a table
>
> CREATE TABLE address (..., ownerId int, ...)
>
> I alse have many other tables, such as employee, contractor, vender.... All
> of these table can own an address.
>
> What is the best way to delete an address if I delete an employee or contractor?
>
> I can not use
>
> FOREIGN KEY (customerId) REFERENCES customer (id)
>
> on address, because I can only reference customer, not employee or contractor.
>
> Any information would be appreciated. Thanks in advance.

I'd say, you're better of if you have employees, contractors, vendors and the like reference the address table. But I do not understand your requirments and I might be wrong.

Rene Nyffenegger

-- 
  no sig today
Received on Sun Mar 02 2003 - 11:20:33 CST

Original text of this message

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