Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Data access object
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Abstract interface to a computer database}} {{About|the software design pattern|the Microsoft library|Jet Data Access Objects}} In [[software]], a '''data access object''' ('''DAO''') is a pattern that provides an abstract [[Interface (computer science)|interface]] to some type of [[database]] or other [[Persistence (computer science)|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 [[Database Management System|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 Platform, Enterprise Edition|Java EE]] applications and with [[relational databases]] (accessed via the [[JDBC]] API because of its origin in [[Sun Microsystems]]' best practice guidelines<ref> {{cite web | title = Core J2EE Patterns - Data Access Objects | publisher = Sun Microsystems Inc. | url = http://www.oracle.com/technetwork/java/dataaccessobject-138824.html | date = 2007-08-02 }}</ref> "Core J2EE Patterns". This object can be found in the [[Data_access_layer|Data Access layer]] of the [[Multitier_architecture|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.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)