Data Access Object

Also Known As

DAO

Brief Description

Code that depends on specific features of data resources ties together business logic with data access logic. This makes it difficult to replace or modify an application's data resources.

The Data Access Object (or DAO) pattern:

The DAO pattern allows data access mechanisms to change independently of the code that uses the data.

Detailed Description

See the Core J2EETM Patterns

Detailed Example

The Java Pet Store sample application uses the DAO pattern both for database vendor-neutral data access, and to represent XML data sources as objects.


Copyright © 2002 Sun Microsystems, Inc. All Rights Reserved.