File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Entity Bean and DAO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Entity Bean and DAO" Watch "Entity Bean and DAO" New topic

Entity Bean and DAO

aakash bhatt
Ranch Hand

Joined: Jan 09, 2003
Posts: 182
What is the difference between Entity Bean and DAO.
and when should we use DAO and Entity Bean
Rajeshwari Natarajan
Ranch Hand

Joined: Mar 05, 2003
Posts: 67
A DAO is used to basically write all data access logic. U might be reading the data from a database, flat file or any other source. U'll start with a top level DAO class and a separate DAO for each underlying data storage. The client only needs to know the methods to be invoked to get data and not the underlyisng data storage logic.
U can use DAO in conjunction with an BMP entity beans. That way u won't have to make changes in ur bean everytime u want to make changes to ur database calls.

regards<br />Rajeshwari. N
Ajith Kallambella

Joined: Mar 17, 2000
Posts: 5782
You may want to read the following articles -

Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
wood burning stoves
subject: Entity Bean and DAO
It's not a secret anymore!