Oracle cascade remove only when last reference was deleted

68 Views Asked by At

I am modeling a DB Shema for Oracle DB

There is an Object Man.
Object Man references Object Address
There may be multiple Man referencing the same Address

How can I make Oracle cascade remove an entry corresponsing to Object Address, together with Object Man which was referencing it. But only if it was the last Man referencing the given 'Address'?

1

There are 1 best solutions below

0
On

You would need to use a trigger.