Re: Modelling a M:N Relationship
Date: Mon, 11 Nov 2002 18:10:38 +0100
Message-ID: <dwRz9.384$tQ1.45820_at_news.siol.net>
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_at_hotmail.com> wrote in message
news:c6bz9.27662$zX3.69368_at_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
>
>
Received on Mon Nov 11 2002 - 18:10:38 CET