This week's giveaway is in the Spring forum.
We're giving away four copies of Microservices Testing (Live Project) and have Chris Love & Andres Sacco on-line!
See this thread for details.
Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

EJBQL vs. relationships (CMR)

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Sorry, I write this message for the second time, because I can't find the first.

I have following relationship :
project 1 --> participant 1 --> * services (uni)

Now I need a list about one special service with the names of the participants.

What's the best way to do this.
1. EJBQL with IN ...
or 2. define a bidirectional relationship
project 1 --> * services * --> 1 participant and use the CMR Collections ?

Is it a performance problem to have a lot of relations ??
E.g. my project is a central bean. Should I kepp the relationships down ?
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean by this


project 1 --> participant 1 --> * services (uni)



Does it mean following cardinality?

Cardinality of project and participant is one to one and
Cardinality of participant and services is one to many



[ April 25, 2005: Message edited by: Kanishtha Kramalekhaka ]
 
Georg Joo
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I mean project to participant is one to many.

What I will know : What's the better way. To have many CMR Collections (relationships) e.h. my project or to get the list about EJBQL ?

Can it be a problem for the performance to have a lot of realtionships ?

regards

Georg
 
Mudi Appu
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Georg,
It is depending on your business requirements. If you only needs to get the list of names of participants (and you do not need to do anything more with participants objects) EJB-QL may be the better option. But keep in mind that; EJB_QL is not good in performance as SQL.
 
Georg Joo
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thannks

Regards

Georg
 
reply
    Bookmark Topic Watch Topic
  • New Topic