From: "Ognjen Antonic" <ogo@ogo.homeip.net>
Newsgroups: comp.databases.oracle
References: <c6bz9.27662$zX3.69368@news.indigo.ie>
Subject: Re: Modelling a M:N Relationship
Lines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <dwRz9.384$tQ1.45820@news.siol.net>
Date: Mon, 11 Nov 2002 18:10:38 +0100
NNTP-Posting-Host: 193.77.16.140
X-Complaints-To: abuse@siol.net
X-Trace: news.siol.net 1037034633 193.77.16.140 (Mon, 11 Nov 2002 18:10:33 MET)
NNTP-Posting-Date: Mon, 11 Nov 2002 18:10:33 MET
Organization: Slovenija OnLine - SiOL


You are complicating too much.

Make three tables:
-Products,
-Suppliers,
and
-Products_Suppliers (you can also name it Suppliers_Products) where you link
tables Products and Suppliers.

Relationships:
Products:Products_Suppliers 1:N (one to many)
Suppliers:Products_Suppliers 1:N (one to many)
There is no N:N (many to many) relationships. There can only be 1:N (one to
many) relationships.

Read a good book on basics of relational database theory if you still didn't
catch my idea. You will need the knowledge for getting deeper into database
stuff.

Regards,

Ognjen Antonic - Ogo




"Colum Foley" <columfoley@hotmail.com> wrote in message
news:c6bz9.27662$zX3.69368@news.indigo.ie...
> Hello,
> I am having great difficulty in modelling the following relationship in
> Oracle and would appreciate any help.
>
> I have a type called Product and I want to store a nested table of all
> Suppliers of this product.
> Also for suppliers I want to store all the products they supply. So ill
 have
> a kind of two-way nested table.
> How would I go about modelling this realtionship?
> I am a begginer to Oracle ,  and would prefer a simple solution but any
 help
> will be much appreciated.
> Thanks
> Colum
>
>



