This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

HF EJB QL questions.

 
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Folks, could you please comment these questions for me?

Tks in advance!!!

1 - What designates the query domain? WHERE or FROM clause?

2 - What designates the type of objects to be selected? SELECT or FROM clause?

3 - About WHERE clause : "Identification variable can represent a single value or a collection" - Why isn't this statement correct?

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

1- The WHERE clause reduces the scope of the query and limit the number of items selected. I think we can say that's the query domain but i'm interested too in a confirmation.

2- The FROM clause determines the entity bean types that will be included in the SELECT statement. (it provides the "scope" of the SELECT)

3- It's illegal to navigate cross a collection-based relashionship field.
This makes sense: you can't use a navigation operator (.) in Java to access elements of a Collection.

The Chapter 9 of O'reilly EJB3 books is very good in EJBQL.

Beno�t
 
Steven Colley
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Benoit,

First of all, tks for providing me this information!! ;-)
"The Chapter 9 of O'reilly EJB3 books is very good in EJBQL."

As far my questions/your asnwers....here is what I�ve found later:

1 - The FROM clause designates the query domain. And the "query domain" means "the deploy descriptor - ejb-jar.xml" i mean..all those entity beans which have been declared inside some specific ejb.-jar.xml and that can have a relationship.

2 - What designates the type of objects to be selected? SELECT clause.

3 - I still dind�t understand this question.

Please let me know if it does not make sense!!!

Tks so much!!!
 
Benoît de Chateauvieux
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Felipe,

Thanks for your answer and your corrections...

I think you're right.
I best understand, now, the concept of query domain.
And of course, you're right in the second point !

For the third point, I think I was mistaken.
Can you confirm that the "Identification variable" is the identifier of the entity in the FROM clause: ?

Thanks a lot for your questions and this conversation.
It helps me clarify a lot of things
 
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SELECT OBJECT (m) FROM MovieSchema AS m
In above query
A SELECT clause determines the type of the objects or values to be selected
FROM clause defines Domain and also identification variable.
m is identification variable.
 
Steven Colley
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI Benoit and Gowher !!!

Ok, that's all so folks!!!

Tks sooo much!!!

Have a good studying!!!
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic