Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: 1:c - relation in oracle

Re: 1:c - relation in oracle

From: Frank van Bortel <fbortel_at_nescape.net>
Date: Tue, 23 Dec 2003 23:28:24 +0100
Message-ID: <bsaf0v$f8q$2@news2.tilbu1.nb.home.nl>


Christian Nein wrote:

>>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
>
>

Nonsense, or non-sense, or non sensible. If so - try triggers.
-- 
Merry Christmas and a Happy New Year,
Frank van Bortel
Received on Tue Dec 23 2003 - 16:28:24 CST

Original text of this message

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