Sunday, May 17, 2020

Multi Association (many to Many)

Multi Association is kind of association in database between 2 tables, generally this is theoretically term.

multi- association reference generally handle by below table, this is also called linking table. It has same synonyms like
cross-reference table,
bridge table,
join table,
map table,
intersection table,
linking table,
link table

Structure Explanation, ( There is 2 table, Customer is one table, Address is second table), I need to create link table where i can store ID of both tables. I will create a table Custom_address whose structure like as below.

 Customer   
 ID First Name Last Name Middle Name
 1 KindSinghs. 
 2 NiceSingh 


Address  
 ID State Country
 1 PunjabIndia
 2 GoaIndia
 3 New YorkUnited State


Customer_ID column has reference to Customer table, and Address_id column has reference to Address table

 Customer Id Address Id
 11
 13
 21
 22


Note*- Its also depends upon the database designer, some time user create ID column in link table sometimes not.

No comments:

Post a Comment

web stats