If I may jump in here real quick:

As many others, I have spent a considerable amount of my professional
lifetime dealing with relational database schema. A while ago, I also took
time to study the threoretical underpinnings (C.J Date is sometimes fun to
read).
I have never before heard that using an associative table was necessary or
recommended when dealing with 1->N relationships. As far as I remember, at
least until 3rd normal form there is no such notion, either (there are
higher normal forms, which are, however, hardly ever used).

my 2cts.

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Tuesday, January 23, 2001 9:14 AM
Subject: O/R Mapping


>
>
> Hi Tony!
>
> Thanks for your quick answer. But I'm still not convinced. Besides many to
> many relation there is, as I see it, no need for a third table (with this
> principle, a many-to-many relation would result in five tables as you
> translate it to two many-to-one, or?). Let me exemplify my conception with
> order and orderlines (one to many):
>
> OO-model
>
> Order:
>      public abstract void setOrderId(String orderId);
>      public abstract String getOrderId();
>      public abstract Collection getOrderLines(); // A collection with
references to orderlines
>
> OrderLines:
>      public abstract void setOrderLineId(String orderLineId);
>      public abstract String getOrderLineId();
>
> An ER-model of the same relation would according to my conception be as
follows (if you disregard the mapping):
>
> Order:
>      OrderId (PK)
>
> OrderLines
>      OrderLineId (PK)
>      OrderId (FK) // Foreign key to order.
>
> In this case there is no redundancy. Or am I totally lost?
>
> Regards, Theis.
>
>
>
>
>


Reply via email to