Code that depends on specific features of data resources ties together business logic with data access logic. This makes it difficult to replace or modify an application’s data resources.
The Data Access Object (or DAO) pattern:
- separates a data resource’s client interface from its data access mechanisms
- adapts a specific data resource’s access API to a generic client interface
The DAO pattern allows data access mechanisms to change independently of the code that uses the data. more …