EJB or sql query 2003-10-01 - By Stan Ou
Back Hi all, I'm trying to digest the sample oracle vsm(virtual shopping mall) code to get a better understanding of J2EE. For those who are not familiar with that sample app, the logic is actually quite simple.
One of the functionality is to display the last few orders the logged in user has placed along with along with each item's description. In the app, it gets a reference to the orderEJB, get a collection of orders, iterate this collection, for each element in collection, get a reference to the orderItems ejb, get a collection of items for this order. Then assemble these in a VO and pass it back to the web tier. Quite some work. Now my question is wouldn't it be more efficient to run a sql like this (or for anything where I need to join several tables):
select some orderinfo, iteminfo from orders join orderItems where orderBy = user and etc, etc.
Is fine-grained better than coarse-grained, can soemone shed some light on this ?
thanks
stan
__ ____ ____ ____ ____ ____ ______ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com
=========================================================================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help".
|
|