This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes OO, Patterns, UML and Refactoring and the fly likes UML and Entity relationships Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "UML and Entity relationships" Watch "UML and Entity relationships" New topic
Author

UML and Entity relationships

vivek mahadevan
Greenhorn

Joined: May 20, 2005
Posts: 26
the UML relationship and the EJB entity relationship have different types of relationships. How can we relate the UML relationships to the Entity relationships.

example.

UML

Table 3: Multiplicity values and their indicators
Potential Multiplicity Values Indicator Meaning
0..1 Zero or one
1 One only
0..* Zero or more
* Zero or more
1..* One or more
3 Three only
0..5 Zero to Five
5..15 Five to Fifteen

EJB relationships

one to one
one to many
many to one
many to many


what is the corresponding relationship in a entity relationship in EJB. How to map the 0..1, 0..*, 1...*, 3 etc in entity.
Hoping my question is valid.
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

First of all: Entity beans could be considered as an deprecated technology as it has been replaced by JPA. I would move towards JPA if I where you.

I think the word you're looking for is cardinality.

0..1 Is just a simple Entity reference.
0..* Is a OneToMany Relation
The others you'll have to combine OneToMany relations with NonNull entity references although I don't know if that is possible with Entity beans.


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
 
Don't get me started about those stupid light bulbs.
 
subject: UML and Entity relationships
 
Similar Threads
Cascade-delete Question
Pls answer these 5 questions
Chapter 7 - HF study group
Problem with Transaction Timeout
Relationship between CMP and BMP entity