Data access object
A data access object is a component that encapsulates operations for accessing and manipulating persistent data, separating persistence concerns from application logic.
Java Persistence with Spring Data and Hibernate epub
The data access object pattern separates an abstract data-access interface from the implementation details of communicating with a database.
- How it is used
- Separates application access operations from database communication in Spring-managed JPA or Hibernate persistence applications.
- How deep it goes
- Builds interfaces and implementations, then addresses injection, transactions, and reusable base classes rather than stopping at a pattern definition.
- Examples
- Uses ItemDao and BidDao interfaces, their Spring-managed implementations, and an application service that injects ItemDao.
- What you can do after
- Build it from scratch with a Spring-managed JPA DAO, or evaluate whether a generated Spring Data JPA repository is sufficient.
Read how Java Persistence with Spring Data and Hibernate epub explains data access object →
Akka in Action, Second Edition
A data access object is an application-layer object that encapsulates operations for accessing a data store.
- How it is used
- Encapsulates database statements behind an abstraction used by controllers for business logic.
- How deep it goes
- Traces failures, concurrency risks, multi-table writes, and slower database-backed testing without showing DAO implementation code.
- Examples
- Uses Conversation and Message insertion, duplicate-record risks, database outages, and database-backed tests.
- What you can do after
- Diagnose database-operation failures and inconsistent multi-step writes when replacing in-memory objects with DAOs.
Read how Akka in Action, Second Edition explains data access object →
Related concepts
- repository patternequivalent to · The repository pattern is a software design pattern that abstracts access to and persistence of application or domain data, hiding storage-specific operations.
- repository annotationconfigured by · The Spring @Repository annotation marks a class as a data-access component eligible for Spring bean registration and persistence-exception translation.
- Spring Data JPAalternative to · Spring Data JPA is a Spring module that provides repository abstractions and query support for accessing relational data through JPA implementations.
- controllerused by · A controller is a software component or architectural role that receives inputs or requests and coordinates their handling by other parts of an application.
- database access abstractionkind of · A database access abstraction is a software layer that hides database-specific operations behind a higher-level interface.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

