Re: enforce no master without detail

From: Shakespeare <whatsin_at_xs4all.nl>
Date: Wed, 05 Aug 2009 12:12:09 +0200
Message-ID: <4a795af4$0$188$e4fe514c_at_news.xs4all.nl>



steph schreef:
> Hi,
>
> I'm just wondering ...
>
> what would be the most elegant way to enforce the rule "don't create a
> master without at least one detail"
> having a master-table and a detail-table connected via 1:n
> relationship? The desired behaviour should be an error being raised
> when committing an insert on the master-table where no details exist
> (similarily deleting the details and leaving the master should raise
> an error).
>
> thanks,
> stephan

Besides from rethinking your business constraints, you're question was answered in
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:42170695313022

Shakespeare Received on Wed Aug 05 2009 - 05:12:09 CDT

Original text of this message