wood burning stoves
The moose likes OO, Patterns, UML and Refactoring and the fly likes Entity Relationships - Many-to-Many mapping ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Entity Relationships - Many-to-Many mapping ?" Watch "Entity Relationships - Many-to-Many mapping ?" New topic

Entity Relationships - Many-to-Many mapping ?

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1430
Class A and Class B has many-to-many relationship. Hence i broke into 2 one-to-many relationship using link class L. What is the relationship between Class A to Class L and Class L to Class B. Is it agreegation or composite agreegation ?
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
Most of the time it will be just an association.

SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
What do you need the "link class" for? I know that you need a link *table* in a RDBMS, but that doesn't mean that you also need a class...

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
There are some cases that we want to model links as objects, like we want to specify additional attributes to the links.
I agree. Here's the link: http://aspose.com/file-tools
subject: Entity Relationships - Many-to-Many mapping ?
jQuery in Action, 3rd edition