Many to many relationship and association table

  • Follow


When we have a many to many relationship between 2 tables, why do we create 
a 3rd table between known as association table ? Don't seem to understand. 
Please assist.

Thanks 

0
Reply Raj 8/5/2010 3:53:41 AM

On Wed, 4 Aug 2010 20:53:41 -0700, "Raj" <raj@hotmail.com> wrote:

>When we have a many to many relationship between 2 tables, why do we create 
>a 3rd table between known as association table ? Don't seem to understand. 
>Please assist.

     To establish what links to what.

     Were it 1-to-many, each row in the many table can have an FK into
the 1 table.  How can you do it with many-to-many?  Where would you
put the values?  With the association table, every valid combination
has a row in the association table with FKs into the two many tables.

Sincerely,

Gene Wirchenko
0
Reply Gene 8/5/2010 4:35:56 AM


>> When we have a many to many relationship between 2 tables, why do we create a 3rd table between known as association table? <<

The third table is a relationship and not an "association table"; I
have no idea where you got that term.

How else would you do it? Think about it.

A table models either a set of entities or a relationship or an
auxiliary set of data. I have several examples of how to use UNIQUE
constraints set the degree and membership of a relation. If you don't
know those terms, you need to read a book on basic data modeling.
0
Reply CELKO 8/6/2010 2:55:01 AM

2 Replies
1131 Views

(page loaded in 0.056 seconds)

Similiar Articles:
















7/20/2012 8:03:53 AM


Reply: