ER Diagrams   «Prev 

Many-to-many Relationship in Database

Many to many relationships can only exist while you conceptually design the database and this is when you need to eliminate them. You physically cannot have it in a working database otherwise your schema would need to change continually.
A many-to-many (M:N) relationship, sometimes called non-specific, is when for one instance of entity A, there are zero, one, or many instances of entity B and for one instance of entity B there are zero, one, or many instances of entity A.
An example is:
"employees can be assigned to no more than two projects at the same time; projects must have assigned at least three employees"

1) The diagram above illustrates an M:N relationship between Table A and B from the viewpoint of Table A. Note that the record in Table A is related to many records in Table B (A:B = 1:N).

2) The relationship between Tables A and B from the viewpoint of Table B appears this way. Note that one record in Table B is related to many records in Table A (B:A = 1:M).