Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: 1:c - relation in oracle
You aren't defining relationships with this but business rules.
Implementation of business rules definitely belongs in code - my preference
would be packages called by triggers but others will have different
preferences/standards
-- Niall Litchfield Oracle DBA Audit Commission UK "Christian Nein" <christian_at_nein.de> wrote in message news:bs9hoh$1qo$02$1_at_news.t-online.com...Received on Tue Dec 23 2003 - 09:24:30 CST
> > Er.. since when does the N part in 1:N not mean 1:2? Or 1:1? Or 1:2?
> >
> > Or did you mean 1:3? Well, N can also be 3. Here ya go. N := 3. Thus 1:N
> is now 1:3.
> >
> > That is why it is called a 1:N relationship.
> >
> > N can even be c. N := c. Now 1:c is also realised.
> >
> > Entity relationships are either a 1:N or N:M. Show me one that is not.
> >
> > --
> > Billy
>
> I think you got me wrong. Here is an example of what I mean:
>
> Let's say we have 2 tables, one containg INVOICES and a second one
containg
> the associated INVOICE LINE ITEMS
>
> case 1)
> A relation shall ensure that each INVOICE exactly has 2 INVOICE LINE ITEMS
> (not 0 or 1 or 3 or 4 or ...)
>
> case 2)
> A relation shall ensure that each INVOICE has maximal one (0 or 1) INVOICE
> LINE ITEMS
>
> How can I define these relations without using triggers?
>
> Christian
>
>