FACTOID # 16: Only two countries in the world are doubly landlocked: Liechtenstein and Uzbekistan.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > 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. Data Access Objects (DAO) were an object oriented interface created by Microsoft which allowed early versions of Microsoft Access and Visual Basic the Jet database engine. ...

Contents

Description

In computer software, a Data Access Object (DAO) is an Object (computer science) 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). It has been suggested that this article or section be merged with Computer program. ... In strictly mathematical branches of computer science the term object is used in a purely mathematical sense to refer to any thing. While this interpretation is useful in the discussion of abstract theory, it is not concrete enough to serve as a primitive datatype in the discussion of more concrete... An interface defines the communication boundary between two entities, such as a piece of software, a hardware device, or a user. ... This article is about computing. ...


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[1] ("Core J2EE Patterns") for that platform. Java 2 Platform, Enterprise Edition or Java EE (formerly also J2EE) is a programming platform – part of the Java platform – for developing and running distributed multi-tier architecture applications, based largely on modular components running on an application server. ... Java 2 Platform, Enterprise Edition or Java EE (formerly also J2EE) is a programming platform – part of the Java platform – for developing and running distributed multi-tier architecture applications, based largely on modular components running on an application server. ...


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, 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, or many others. Using Data Access Objects means the underlying technology can be upgraded or swapped without changing other parts of the application. “Java language” redirects here. ... The Java Persistence API, sometimes referred to as JPA, is a Java programming language framework that allows developers to manage relational data in Java Platform, Standard Edition and Java Platform, Enterprise Edition applications. ... JDBC is an API for the Java programming language that defines how a client may access a database. ... Java Data Objects, or JDO, is a specification of Java object persistence. ... Simple EJB Architecture Enterprise Java Beans (EJB) is a managed, server-sided component for modular construction of enterprise applications. ... TopLink is an object-relational mapping package for Java developers. ... Hibernate is an object-relational mapping (ORM) solution for the Java language: it provides an easy to use framework for mapping an object-oriented domain model to a traditional relational database. ... iBATIS is a persistence framework which enables mapping sql queries to POJOs (Plain Old Java Objects). ...


See also

Data Transfer Objects (DTO), a. ... This article is about the book by Gamma et al. ... Object-Relational mapping (aka O/RM, ORM, and O/R mapping) is a programming technique for converting data between incompatible type systems in databases and object-oriented programming languages. ... Service Data Objects is a technology that allows heterogeneous data to be accessed in a uniform way. ...

External links

Tools

  • DAO-Generator DAO and DTO code generator for most of the popular RDBMS
  • DB Solo JDBC/EJB 3.0 DAO code generator
  • MDAOG DAO code generator for PostgreSQL databases
  • CodeFutures (Firestorm/DAO) DAO + DTO + Web Tier code generator for JDBC, EJB 2.0, JPA, Hibernate

PostgreSQL is a free software object-relational database management system (ORDBMS), released under a BSD-style license. ...

References

  1. ^ Core J2EE Patterns - Data Access Objects. Sun Microsystems Inc. (2007-08-02).

  Results from FactBites:
 
Design Patterns: Data Access Object (1335 words)
The DAO pattern allows data access mechanisms to change independently of the code that uses the data.
The simplest (but least flexible) way to implement a data access object is to write it as a class.
The data access mechanism can be changed easily by writing a new class that implements the same interface, and changing client code to use the new class.
Core J2EE Patterns: Data Access Object (2794 words)
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.
Because all data access operations are now delegated to the DAOs, the separate data access layer can be viewed as the layer that can isolate the rest of the application from the data access implementation.
  More results at FactBites »


 
 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m