views:

193

answers:

6

I ask this because need to understand/explain better with examples.

clasical examples like: an Article can be published in multiple Publication objects, and a Publication has multiple Article objects. (source)

I see is usefull for web2.0 for sharing features.

+4  A: 

Actors <-> Movies is fairly common.

too much php
+1  A: 

You don't need two different tables either. I have many friends, and many people have me as a friend.

Marius
+1  A: 

Items<->Orders is a fairly common one.

Spencer Ruport
+5  A: 
  • Library <-> Book
  • Song <-> Album
  • Song <-> Artist
  • Book <-> Author
  • Program <-> Computer
  • and so on.

The point here being that these aren't examples of when it's a good idea to implement many-to-many relationships. These are good examples of relationships that are many-to-many relationships.

I make that distinction because many-to-many typically isn't a modeling choice: it's just what the data is (in the context of your model).

cletus
I agree, "when it's a good idea to implement many-to-many relationships" is the the question, based on examples.
panchicore
Good point. You discover the relationships. You don't invent them.
Walter Mitty
+1  A: 

SO Question <-> Tags

serg
+1  A: 

Property <-> Owner Shared Bank Account <-> Account Holder (which is not the same as Shared Account <- Primary Holder)

Many-to-Many relations can span through domains and be reflective and transitive. Class Subject <-> Student <-> Instructor

luis.espinal