Table of Contents

About

A data access object (DAO) is an object that provides an abstract interface to some type of database or persistence mechanism, providing some specific operations without exposing details of the database.

It provides a mapping from application calls to the persistence layer.

They are used to perform statements with the data source.

This design pattern is equally applicable to most programming languages, most types of software with persistence needs and most types of database, but it is traditionally associated with Java EE applications and with relational databases accessed via the JDBC API because of its origin in Sun Microsystems' best practice guidelines (“Core J2EE Patterns”).

Implementation

JPA

By defining DAO interfaces and implement them with the JPA API, you can create/find/update/remove entities.

Documentation / Reference