Data access layer

Data access layer

A data access layer (DAL) is a layer of a computer program which provides simplified access to data stored in persistent storage of some kind, such as an entity-relational database.

For example, the DAL might return a reference to an object (in terms of object-oriented programming) complete with its attributes instead of a row of fields from a database table. This allows the client (or user) modules to be created with a higher level of abstraction. This kind of model could be implemented by creating a class of data access methods that directly reference a corresponding set of database stored procedures. Another implementation could potentially retrieve or write records to or from a file system. The DAL hides this complexity of the underlying data store from the external world.

For example, instead of using commands such as insert, delete, and update to access a specific table in a database, a class and a few stored procedures could be created in the database. The procedures would be called from a method inside the class, which would return an object containing the requested values. Or, the insert, delete and update commands could be executed within simple functions like registeruser or loginuser stored within the data access layer.

Also, business logic methods from an application can be mapped to the Data Access Layer. So, for example, instead of making a query into a database to fetch all users from several tables the application can call a single method from a DAL which abstracts those database calls.

Applications using a data access layer can be either database server dependent or independent. If the data access layer supports multiple database types, the application becomes able to use whatever databases the DAL can talk to. In either circumstance, having a data access layer provides a centralized location for all calls into the database, and thus makes it easier to port the application to other database systems (assuming that 100% of the database interaction is done in the DAL for a given application).

Object-Relational Mapping tools provide data layers in this fashion, following the active record model. The ORM/active-record model is popular with web frameworks.

See also

References

External Links


Wikimedia Foundation. 2010.

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

Look at other dictionaries:

  • 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 link layer — The OSI model 7 Application layer 6 Presentation layer 5 Session layer 4 Transport layer 3 Network layer 2 …   Wikipedia

  • Data Link Layer — The Data Link Layer is Layer 2 of the seven layer OSI model. It responds to service requests from the Network Layer and issues service requests to the Physical Layer.The Data Link Layer is the protocol layer which transfers data between adjacent… …   Wikipedia

  • data-link layer —    The second of seven layers of the OSI Reference Model for computer to computer communications. The datalink layer validates the integrity of the flow of data from one node to another by synchronizing blocks of data and controlling the flow of… …   Dictionary of networking

  • Data Access in Real Time — (DART) is a Real time operating system used by EMC Celerra. It is a modified UNIX Kernel with additional functionality. DART is an embedded, real time, operating system comprising a modified UNIX kernel and dedicated file server software that… …   Wikipedia

  • Data Access Language — Data Access Language, or simply DAL, was a SQL like language parser released by Apple Computer in 1990 to provide unified client/server access to database management systems. It was known for poor performance and high costs, something Apple did… …   Wikipedia

  • Data Access Manager — The Data Access Manager (DAM) was a database access API for the Mac OS, introduced in 1991 as an extension to System 7. Similar in concept to ODBC, DAM saw little use and was eventually dropped in the late 1990s. Only a handful of products ever… …   Wikipedia

  • 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

  • Microsoft Data Access Components — MDAC redirects here. For other uses, see MDAC (disambiguation). MDAC (Microsoft Data Access Components) Microsoft Corporation s MDAC provides a uniform framework for accessing a variety of data sources on their Windows platform. Developer(s)… …   Wikipedia

  • Data virtualization — describes the process of abstracting disparate data sources (databases, applications, file repositories, websites, data services vendors, etc.) through a single data access layer (which may be any of several data access mechanisms). This… …   Wikipedia

Share the article and excerpts

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