• 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
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

To bert bates about Head first EJB

 
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bert
I was going through your Head First Book. In Entity bean mock exam session i have one confusion in ques 12 which says
Given CMP beans CustomerBean,OrderBean, and LineItemsBean with the following relationships:
CustomerBean(1) ---- OrderBean(n)
OrderBean(1) ----- LineItemsBean(n)
Which will return all orders that have line items?
The answer given are

B. SELECT DISTINCT OBJECT(o) FROM Order o,IN(o.lineItems)li

D. SELECT OBJECT(o) FROM Order o.

How can D be right because D will return even those orders taht have no line items??
Plz clarify if possible
Thanks
kundan
 
cowbird
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Option D will indeed return ALL orders. And since orders with lineitems are a subset of ALL orders, option D will return all orders having lineitems.

It's about the interpretation of the question, they didn't ask you which option would ONLY return orders having lineitems.
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thats a Tricky question.
So every word in the Question matters.

Thanks for letting us Know.
 
Jef Cumps
cowbird
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, indeed, every word in the question matters ! But don't get afraid of the real exam, the questions are not made as tricky as can be, most of them are really clear and just test your knowledge, not your trick-awareness...
 
kundan varma
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes you r right jeff , sometimes simple thing skip from the mind.
THanks
kundan
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic