Re: circular relationships ok?

From: Gene Wirchenko <genew_at_ucantrade.com.NOTHERE>
Date: Thu, 02 Mar 2006 16:35:00 -0800
Message-ID: <8i3f02p6ft6c5fs105iitackpra93b17q8_at_4ax.com>


On 2 Mar 2006 15:35:41 -0800, "Marshall Spight" <marshall.spight_at_gmail.com> wrote:

>Gene Wirchenko wrote:
>> On 2 Mar 2006 14:23:49 -0800, "Marshall Spight"
>> <marshall.spight_at_gmail.com> wrote:
>>
>> >David Portas wrote:
>> >>
>> >> For example, suppose I want to implement a constraint that each Order
>> >> must have exactly one Invoice and each Invoice must have exactly one
>> >> Order. That seems like a reasonable business rule, even if it's a
>> >> slightly unusual one.
>> >
>> >If that is the business rule, then are not Invoices and Orders
>> >the same entity?
>>
>> No. (Trying substituting "husband" for "order" and "wife" for
>> "invoice".)
>
>Okay. Let me adjust my phrasing:
>
>If that is the business rule, then are not Invoices and Orders
>the same SQL table?

     They might be, but need not be. 1-1 relationships are possible. Again, consider husband and wife.

     I think the example is somewhat artificial. In the system that I support at work, in general, an invoice has exactly one work order, but a work order has UP TO one invoice. (The work order has been invoiced, or it has not been invoiced.)

Sincerely,

Gene Wirchenko Received on Fri Mar 03 2006 - 01:35:00 CET

Original text of this message