Should I use Entity Beans for all database tables, even though they may have complicated relations and joins? Or should I just use them for frequently-used and simple tables such as account info?

Robert Castaneda

This is a question for which there is no "yes-or-no" answer for and depends on the functionality of the product(s) that you are using, and the requirement of the system.

An example of this is the ability to support dependant objects, which is coming in EJB 2.0, Inprise Application Server 4.1 supports this feature, where you can have non-EJB Java objects inside your Entity Beans, which map to different tables in the database. Giving you one entity bean covering multiple tables.

As a general note, I like to use Entity Beans which wrap a table and its dependants, so that other programmers do not have to remodel simple relationships such as Orders/OrderLines if there was an Entity Bean per table.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact