EJB QL or SQL ?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Pep_Grifell
Posted On:   Wednesday, July 31, 2002 02:29 AM

Hi, I'm a bit new in EJB's. I'm creating a online bookstore example where I have customers, books, orders, order lines, ... I need to convert every table in the DB as a entity bean ? if not, how can I update or insert new information in the tables ? I thought about accessing the DB from a session bean (doing a connection) but not sure ... If I have book as entity bean, and I want to do a search by author (I have to do a query), what is better, use the ejb QL or do a connection from a session bean to the database and do a query to the db ? Is ejb QL so fast as SQL ? Thank you very much !    More>>

Hi,


I'm a bit new in EJB's.




I'm creating a online bookstore example where I have customers, books, orders, order lines, ...

I need to convert every table in the DB as a entity bean ? if not, how can I update or insert new information in the tables ?

I thought about accessing the DB from a session bean (doing a connection) but not sure ...


If I have book as entity bean, and I want to do a search by author (I have to do a query), what is better, use the ejb QL or do a connection from a session bean to the database and do a query to the db ?


Is ejb QL so fast as SQL ?


Thank you very much !

   <<Less

Re: EJB QL or SQL ?

Posted By:   Ankur_Lamba  
Posted On:   Sunday, August 4, 2002 06:34 PM

performance is indirectly proportional to the ease of development.


having said that, i would suggest you read more about CMP 2.0, that eliminates all JDBC code, the only time you come close to having to do anything at a "database" level is while writing EJB QL queries, which are fun if you have worked on SQL.

About | Sitemap | Contact