• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Many-Many Relationships : EJB-CMP

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do we manage many-many relationships ? In HFEJB, we have only examples of one-one, one-many and many-one?

In database terms, we resolve it by having an XRef table, that has relationships of one-many and many-one.
For example:
Actor(0..m) <- -> (0..n) Movies
(1) An Actor has worked in many movies.
(2) A Movie has many actors.

At database end, we will have an Actor_Movie table in addition to the above two tables.
So we will have the following resolved relationships
Actor [0..1] [0..m] Actor_Movie [0..n] [0..1] Movie

how will we define a descriptor for this ?

Any help will be appreciated .
Regards
Aleena
 
Aleena Rehman
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can any body help ?
Thanks in advance
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For M:N Relationship in Entity Beans:-
Please refer Page 337 of Mastering EJB (2nd Edition NOT 3rd Edition)
 
To do a great right, do a little wrong - shakepeare. twisted little ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!