Spiegato, Home

Technology and Gadgets

What Are Data Access Objects?

  • Published by Spiegato
  • 2 min read

In computer programming, data access objects (DAO) are a design technique that creates a module layer to manage all data access for a software program. This layer is responsible for reading and writing data to a database or external file system. In software design, there are many ways to read and write data to a database. This can cause sloppy software code because developers may use multiple methods to perform the same data access task. One of the primary benefits of using DAOs is the ability to standardize how data is accessed for a software program. The DAO design ensures that all database access will be performed in a similar manner, which makes better software.

Data access objects were first introduced academically in the object-programming model. This architecture approach requires that software be built into specific modules with a specific purpose. The DAO is a software module that has the responsibility of retrieving and modifying all data from any data storage device.

The technique of using DAOs is not unique to a specific programming language. Microsoft MS Access first introduced this approach, but it is currently available in most modern programming languages. It is considered a best practice to centralize data access because it makes the software application flexible. This technique can save valuable development hours because it creates a reusable module for the database.

One example of data access objects in practice is the page-by-page display of results that is often found in a web browser. When the first page of results is displayed after a search, the screen typically allows the user to select the next page of data. This uses the DAO pattern, which allows the user to move forward and backward through a set of data.

Many software frameworks have implemented the data access objects within software tools. Some examples include hibernate, spring, and java data objects (JDO). These frameworks are useful for software developers because they have encapsulated the DAO pattern within the framework, making it hidden from the developer.

Using the data access objects can also save time with testing and deployment of software code. The single coding module is responsible for the data access for the entire application. This makes testing easier because one module can validate multiple data access points of the software.

Key terms in this article

Related articles

  • What Are Collaboration Data Objects?

    Collaboration data objects are programming interface objects used in the Microsoft Windows® and Microsoft Exchange Server® line of software products. They…

  • What are Service Data Objects?

    There are many tools and frameworks designed to help software developers streamline the development process. Service data objects refers to a special…

  • What are Java® Data Objects?

    Java® programming is a computer software language that uses modules and functions to manipulate data. Java® data objects (JDO) is a Java® module that is…

  • What are ActiveX® Data Objects?

    Microsoft® Activex® Data Objects, or ADO, is a tool used to access databases or other data sources. It is one form of Component Object Model (COM) objects…

  • What Is an Object Access Method?

    The object access method (OAM) is used to help people access files in the operating system (OS) via certain command line codes. Unlike other access…