Common · Knowledge
Data access object
Design pattern providing an abstract interface to some type of database or other persistence mechanism, providing data operations to application calls without exposing database details
In software, a data access object (DAO) is a pattern that provides an abstract interface to some type of database or other persistence mechanism. By mapping application calls to the persistence layer, the DAO provides data operations without exposing database details.
From Wikipedia
In software, a data access object (DAO) is a pattern that provides an abstract interface to some type of database or other persistence mechanism. By mapping application calls to the persistence layer, the DAO provides data operations without exposing database details. This isolation supports the single responsibility principle. It separates the data access the application needs, in terms of domain-specific objects and data types (the DAO's public interface), from how these needs can be satisfied with a specific DBMS (the implementation of the DAO). Although this design pattern is applicable to most programming languages, most software with persistence needs, and most databases, 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". This object can be found in the Data Access layer of the 3-Tier Architecture. There are various ways in which this object can be implemented: One DAO for each table. One DAO for all the tables for a particular DBMS. Where the SELECT query is limited only to its target table and cannot incorporate JOINS, UNIONS, subqueries and Common Table Expressions (CTEs) Where the SELECT query can contain anything that the DBMS allows.
Text: Wikipédia, CC BY-SA 4.0. ·
Related cards
-
D★★
Data transfer object
Design pattern where an object carries aggregated data between processes to reduce number of calls needed
-
A★★★
ActiveX Data Objects
Component Object Model APIs for accessing data sources
-
C★
Command pattern
Behavioral design pattern
-
★★
Data model
An abstract model that organizes elements of data and standardizes how they relate to one another and to real world entities.
-
★
Data mapping
Process of linking data objects in distinct models
-
★★★
Access control
Selective restriction of access to a place or other resource, allowing only authorized users