Data Access Object

Data Access Object

:"This article is about the Data Access Object design pattern in object-oriented software design, not about the Data Access Objects library from Microsoft."In computer software, a Data Access Object (DAO) is an object that provides an abstract interface to some type of database or persistence mechanism, providing some specific operations without exposing details of the database. This isolation separates the concerns of what data accesses the application needs, in terms of domain-specific objects and data types (the public interface of the DAO), and how these needs can be satisfied with a specific DBMS, database schema, etc. (the implementation of the DAO).

This design pattern is equally applicable to most programming languages, most types of software with persistence needs and most types of database, but it is traditionally associated with J2EE applications and with relational databases accessed via the JDBC API because of its origin in Sun Microsystems' best practice guidelines [cite web
title = Core J2EE Patterns - Data Access Objects
publisher = Sun Microsystems Inc.
date = 2002
url = http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html
date = 2007-08-02
] ("Core J2EE Patterns") for that platform.

Advantages

The advantage of using data access objects is the relatively simple and rigorous separation between two important parts of an application which can and should know almost nothing of each other, and which can be expected to evolve frequently and independently.Changing business logic can rely on the same DAO interface, while changes to persistence logic do not affect DAO clients as long as the interface remains correctly implemented.

In the specific context of the Java programming language, Data Access Objects can be used to insulate an application from the particularly numerous, complex and varied Java persistence technologies, which could be JDBC, JDO, EJB CMP, TopLink, Hibernate, iBATIS, openJPA or many others. Using Data Access Objects means the underlying technology can be upgraded or swapped without changing other parts of the application.

See also

* Data Transfer Object
* Design Patterns
* Object-relational mapping
* Service Data Object

External links

* [http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html Core J2EE Patterns - Data Access Object]
* [http://nils.kilden-pedersen.net/DAO_pattern/InnerClassStrategy.html Inner Class strategy]
* [http://www.codefutures.com/weblog/andygrove/archives/2005/02/data_access_obj.html Data Access Objects versus Object Relational Mapping]

Tools

* [http://code.google.com/p/persist/ Persist] Java-based ORM tool
* [http://www.dbsolo.com DB Solo] JDBC/EJB 3.0 DAO code generator
* [http://mdaog.sourceforge.net MDAOG] DAO code generator for PostgreSQL databases
* [http://www.codefutures.com CodeFutures] (Firestorm/DAO) Generator for JDBC DAO, Spring DAO, Hibernate DAO

Frameworks

* [http://jingdao.sourceforge.net/ JingDAO] Java based DAO framework

References


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • Data Access Object — Saltar a navegación, búsqueda En software de computadores, un Data Access Object (DAO, Objeto de Acceso a Datos) es un componente de software que suministra una interfaz común entre la aplicación y uno o más dispositivos de almacenamiento de… …   Wikipedia Español

  • Data Access Object — (DAO, deutsch: „Datenzugriffsobjekt“) ist ein Entwurfsmuster, das den Zugriff auf unterschiedliche Arten von Datenquellen (z. B. Datenbanken, Dateisystem, etc.) so kapselt, dass die angesprochene Datenquelle ausgetauscht werden kann, ohne dass… …   Deutsch Wikipedia

  • Data access object — This article is about the data access object design pattern in object oriented software design. For the Microsoft library of the same name, see Data Access Objects. In computer software, a data access object (DAO) is an object that provides an… …   Wikipedia

  • Data Access Object — В программном обеспечении data access object (DAO)  это объект, который предоставляет абстрактный интерфейс к какому либо типу базы данных или механизму хранения. Определённые возможности предоставляются независимо от того, какой механизм… …   Википедия

  • Data Access Object — Objet d accès aux données Un objet d accès aux données (en Anglais Data Access Object ou DAO) est un patron de conception (c est à dire un modèle pour concevoir une solution) utilisé dans les architectures logicielles objet. Sommaire 1… …   Wikipédia en Français

  • data access object — noun an object in programming that provides an abstract interface to some type of persistence mechanism, providing some specific operations without exposing details of the persistence layer …   Wiktionary

  • Data transfer object — (DTO),[1][2] is a design pattern used to transfer data between software application subsystems. DTOs are often used in conjunction with data access objects to retrieve data from a database.[1][2] The difference between data transfer objects and… …   Wikipedia

  • Data Transfer Object — Data Transfer Objects (DTO), formerly known as Value Objects or VO, are a design pattern used to transfer data between software application subsystems. DTOs are often used in conjunction with Data Access Objects to retrieve data from a… …   Wikipedia

  • Data Access Objects — is a general programming interface for database access on Microsoft Windows systems and should not be confused with the Data Access Object design pattern used in object oriented software design. History DAO were originally called VT Objects. DAO… …   Wikipedia

  • Data Access Objects — Saltar a navegación, búsqueda Data Access Objects (DAO, Objetos de Acceso a Datos) es una interfaz orientada a objetos creada por Microsoft la cual permitía a las primeras versiones de Microsoft Access y Visual Basic utilizar el motor de base de… …   Wikipedia Español

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”