Why do we use DAO?

Answer Posted / surajkumar.java

Access to data varies depending upon the source of data
(Relational Database, Object Oriented Database, Flat File
and Business to Business integration systems). Such
disparate data sources offer challenges to create a direct
dependency between application code and data access code.
Including the connectivity and data access code within
application code introduces a tight coupling between the
components (JSP, Servlet or Struts Action) and the data
source implementation. Such code dependencies in components
make it difficult and tedious to migrate, the application
from one type of data source to another. Data Access Object
(DAO) makes abstract and encapsulate all access to the data
source. The DAO manages the connection with the data source
to obtain and store data. The DAO acts as an adapter
between the application components (JSP, Servlet or Struts
Action) and the data source.

Is This Answer Correct ?    41 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is basic authentication?

538


What is japplet in java?

506


What is certificate authority?

557


What is included in j2ee?

492


What is javamail?

522






What is java ee server?

457


What is mean by j2ee?

472


What is a thin client?

568


What is a jbutton in java?

510


What is j2ee api?

508


What is application client?

518


What is authorization constraint?

537


What is source file in java?

505


Define connection pooling?

504


What is java full stack developer?

479