• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

UML and Entity relationships

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic