<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Data_access_object</id>
	<title>Data access object - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Data_access_object"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Data_access_object&amp;action=history"/>
	<updated>2026-05-10T16:58:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=Data_access_object&amp;diff=5283464&amp;oldid=prev</id>
		<title>imported&gt;Toast1454: Reverted edits by 2804:29B8:518C:67A:E2:F2C0:8FBB:8BF7 (talk) (AV)</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Data_access_object&amp;diff=5283464&amp;oldid=prev"/>
		<updated>2025-09-17T17:20:14Z</updated>

		<summary type="html">&lt;p&gt;Reverted edits by &lt;a href=&quot;/wiki143/index.php?title=Special:Contributions/2804:29B8:518C:67A:E2:F2C0:8FBB:8BF7&quot; title=&quot;Special:Contributions/2804:29B8:518C:67A:E2:F2C0:8FBB:8BF7&quot;&gt;2804:29B8:518C:67A:E2:F2C0:8FBB:8BF7&lt;/a&gt; (&lt;a href=&quot;/wiki143/index.php?title=User_talk:2804:29B8:518C:67A:E2:F2C0:8FBB:8BF7&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User talk:2804:29B8:518C:67A:E2:F2C0:8FBB:8BF7 (page does not exist)&quot;&gt;talk&lt;/a&gt;) (&lt;a href=&quot;/wiki143/index.php?title=WP:AntiVandal&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:AntiVandal (page does not exist)&quot;&gt;AV&lt;/a&gt;)&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Previous revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:20, 17 September 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>imported&gt;Toast1454</name></author>
	</entry>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=Data_access_object&amp;diff=519459&amp;oldid=prev</id>
		<title>94.135.171.70: rm whitespace</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Data_access_object&amp;diff=519459&amp;oldid=prev"/>
		<updated>2024-09-02T13:16:10Z</updated>

		<summary type="html">&lt;p&gt;rm whitespace&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Abstract interface to a computer database}}&lt;br /&gt;
{{About|the software design pattern|the Microsoft library|Jet Data Access Objects}}&lt;br /&gt;
&lt;br /&gt;
In [[software]], a &amp;#039;&amp;#039;&amp;#039;data access object&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;DAO&amp;#039;&amp;#039;&amp;#039;) 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&amp;#039;s public interface), from how these needs can be satisfied with a specific [[Database Management System|DBMS]] (the implementation of the DAO).&lt;br /&gt;
&lt;br /&gt;
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]]&amp;#039; best practice guidelines&amp;lt;ref&amp;gt;&lt;br /&gt;
{{cite web&lt;br /&gt;
 | title = Core J2EE Patterns - Data Access Objects&lt;br /&gt;
 | publisher = Sun Microsystems Inc.&lt;br /&gt;
 | url = http://www.oracle.com/technetwork/java/dataaccessobject-138824.html&lt;br /&gt;
 | date = 2007-08-02&lt;br /&gt;
}}&amp;lt;/ref&amp;gt; &amp;quot;Core J2EE Patterns&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This object can be found in the [[Data_access_layer|Data Access layer]] of the [[Multitier_architecture|3-Tier Architecture]].&lt;br /&gt;
&lt;br /&gt;
There are various ways in which this object can be implemented:&lt;br /&gt;
* One DAO for each table.&lt;br /&gt;
* One DAO for all the tables for a particular DBMS.&lt;br /&gt;
* Where the SELECT query is limited only to its target table and cannot incorporate JOINS, UNIONS, subqueries and Common Table Expressions (CTEs)&lt;br /&gt;
* Where the SELECT query can contain anything that the DBMS allows.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
&lt;br /&gt;
Using data access objects (DAOs) offers a clear advantage: it separates two parts of an application that don&amp;#039;t need to know about each other. This separation allows them to evolve independently. If business logic changes, it can rely on a consistent DAO interface. Meanwhile, modifications to persistence logic won&amp;#039;t affect DAO clients.&amp;lt;ref&amp;gt;{{Cite web |date=2022-08-03 |title=Data Access Object(DAO) Design Pattern |url=https://www.digitalocean.com/community/tutorials/dao-design-pattern |access-date=2024-07-08 |website=DigitalOcean |language=en-US}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite web |date=2017-08-26 |title=Data Access Object(DAO) Design Pattern |url=https://www.geeksforgeeks.org/data-access-object-pattern/#8-advantages-of-the-data-access-object-designdao-pattern |access-date=2024-07-08 |website=GeeksforGeeks |language=en-US}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All details of storage are hidden from the rest of the application (see [[information hiding]]). [[Unit testing]] code is facilitated by substituting a [[test double]] for the DAO in the test, thereby making the tests independent of the persistence layer.&lt;br /&gt;
&lt;br /&gt;
In the context of the [[Java (programming language)|Java]] programming language, DAO can be implemented in various ways. This can range from a fairly simple interface that separates data access from the application logic, to frameworks and commercial products.&lt;br /&gt;
&lt;br /&gt;
Technologies like [[Java Persistence API]] and [[Enterprise JavaBeans]] come built into application servers and can be used in applications that use a Java EE application server. Commercial products such as [[TopLink]] are available based on [[object–relational mapping]] (ORM). Popular open source ORM software includes [[Doctrine (PHP)|Doctrine]], [[Hibernate (Java)|Hibernate]], [[iBATIS]] and JPA implementations such as [[Apache OpenJPA]].&amp;lt;ref&amp;gt;{{Cite web |date=2017-08-26 |title=Data Access Object(DAO) Design Pattern |url=https://www.geeksforgeeks.org/data-access-object-pattern/ |access-date=2024-01-29 |website=GeeksforGeeks |language=en-US}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Disadvantages ==&lt;br /&gt;
Potential disadvantages of using DAO include [[leaky abstraction]],{{Citation needed|reason=What kind of leak?|date=August 2014}} [[Duplicate code|code duplication]], and [[abstraction inversion]]. In particular, the abstraction of the DAO as a regular Java object can obscure the high cost of each database access. Developers may inadvertently make multiple database queries to retrieve information that could be returned in a single operation. If an application requires multiple DAOs, the same create, read, update, and delete code may have to be written for each DAO.&amp;lt;ref&amp;gt;See http://www.ibm.com/developerworks/java/library/j-genericdao/index.html for workarounds&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that these disadvantages only appear when you have a separate DAO for each table and the SELECT query is prevented from accessing anything other than the target table.&lt;br /&gt;
&lt;br /&gt;
== Tools and frameworks ==&lt;br /&gt;
* [[ODB (C++)|ODB]] compiler-based [[object–relational mapping]] (ORM) system for C++&lt;br /&gt;
* ORMLite: Lightweight [[object–relational mapping]] (ORM) framework in Java for JDBC and Android&amp;lt;ref&amp;gt;{{cite book|last1=Hodgson|first1=Kyle|last2=Reid|first2=Darren|title=ServiceStack 4 Cookbook|publisher=Packt Publishing Ltd|isbn=9781783986576|page=Chapter 4|url=https://books.google.com/books?id=x9hpBgAAQBAJ&amp;amp;q=%22ORMLite%22&amp;amp;pg=PA129|access-date=22 June 2016|language=en|date=2015-01-23}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* [[Entity Framework|Microsoft Entity Framework]]&lt;br /&gt;
* DBIx::Class [[object–relational mapping]] (ORM) module for [[Perl]]&lt;br /&gt;
* TuxORM: Simple [[object–relational mapping]] (ORM) library in Java for JDBC&lt;br /&gt;
* [[Persist (Java tool)]] Java-based [[object–relational mapping]] and data access object tool&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Create, read, update and delete]] (CRUD)&lt;br /&gt;
* [[Data access layer]]&lt;br /&gt;
* [[Service Data Objects]]&lt;br /&gt;
* [[Object–relational mapping]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
{{Design Patterns Patterns}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Architectural pattern (computer science)]]&lt;br /&gt;
[[Category:Software design patterns]]&lt;/div&gt;</summary>
		<author><name>94.135.171.70</name></author>
	</entry>
</feed>