Data Access Object enables loose coupling between the business and resource tiers. Data Access Object encapsulates all the data access logic to create, retrieve, delete, and update data from a persistent store. Data Access Object uses Transfer Object to send and receive data. The Data Access Object pattern encapsulates access to a persistent store by managing the connection with the data store.
The following lists the benefits of using the Data Access Object pattern:
- Reduces code complexity in client
- Improves code reuse
- Provides easier migration to new data store
You should use the Data Access Object pattern to:
- Decouple data access from the business logic
- Provide all data access from in a separate layer