Data access layer: Difference between revisions

Content deleted Content added
rewrote last para in 3rd person; other copyedits
No edit summary
Line 6:
 
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 your application 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.