Data access object: Difference between revisions

Content deleted Content added
MacTed (talk | contribs)
{{compu-stub}}{{cleanup}}{{comp-wikify}}
Wikified. Also (hopefully) made description understandable to non-programmers.
Line 1:
In [[computer]] [[software]], a '''Data Access Object''' is a [[software component|component]] which provides a common [[Interface (computer science)|interface]] between the [[Application software|application]] and one or more [[data storage device]]s, such as a [[database]] or [[Computer file|file]]. The term is most frequently applied to the Data Access Object [[Design pattern (computer science)|design pattern]].
{{cleanup}}
{{comp-wikify}}
{{compu-stub}}
 
'''Data Access Objects''' was also used by [[Microsoft]] (typically abbreviated to DAO), as the name of a library they created based on this pattern.
== Context ==
 
== Why use data access objects? ==
Access to data varies depending on the source of the data. Access to persistent storage, such as to a database, varies greatly depending on the type of storage (relational databases, object-oriented databases, flat files, and so forth) and the vendor implementation.
 
The advantage of using data access objects is that any [[Business object (computer science)|business object]] (which contains application or operation specific details) does not require direct knowledge of the final destination for the information is manipulates. As a result, if it is neccessary to change where or how that data is stored that modification can be made without needing to change the main application.
== Solution ==
 
== ContextLinks ==
Use a Data Access Object (DAO) to abstract and encapsulate all access to the data source. The DAO manages the connection with the data source to obtain and store data.
* [http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html Sun's definition of the Data Access Object pattern]
 
{{compu-stub}}
The DAO implements the access mechanism required to work with the data source. The data source could be a persistent store like an RDBMS, an external service like a B2B exchange, a repository like an LDAP database, or a business service accessed via CORBA Internet Inter-ORB Protocol (IIOP) or low-level sockets
 
== sources ==
* java.sun.com