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: Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl>
Date: Tue, 23 Dec 2003 16:14:19 +0100
Message-ID: <utmguvooafq4ubc67nd1e1mk4fp0nqqv5c@4ax.com>


On Tue, 23 Dec 2003 15:02:20 +0100, "Christian Nein" <christian_at_nein.de> 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
>

Not

--
Sybrand Bakker, Senior Oracle DBA
Received on Tue Dec 23 2003 - 09:14:19 CST

Original text of this message

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