What is DATA ACCESS OBJECT (DAO) -
It is a object/interface, which is used to access data from database of data storage.
WHY WE USE DAO:
it abstracts the retrieval of data from a data resource such as a database. The concept is to "separate a data resource's client interface from its data access mechanism."
The problem with accessing data directly is that the source of the data can change. Consider, for example, that your application is deployed in an environment that accesses an Oracle database. Then it is subsequently deployed to an environment that uses Microsoft SQL Server. If your application uses stored procedures and database-specific code (such as generating a number sequence), how do you handle that in your application? You have two options:
Its in all referred as DAO Pattern, It consist of following:
Please check this example, This will clear things more clearly.
Example
I assume this things must have cleared your understanding of DAO up to certain extend.