Data access layer: Difference between revisions

Content deleted Content added
BOT--Reverting edits by 203.99.42.146 to revision 204061110 (\bblogspot\.com)
fixed non-encyclopedic, chatty style / WP:V
Line 1:
{{Unreferenced|date=May 2008}}
A '''data access layer''' (DAL) is a [[layer (object-oriented design)|layer]] of a [[computer program]] which provides simplified [[access]] to [[data]] stored in [[persistent storage]] of some kind, such as an [[entity-relational database]].
 
Line 7 ⟶ 8:
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.
 
Also, you can map business logic methods from youran 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.
 
[[Object-Relational Mapping]] tools provide data layers in this fashion, following the [[Active record pattern|active record]] model.