Chapter 6. The Data Access Layer
High thoughts must have a high language.
The data access layer (DAL) is a library of code that provides access to data stored in a persistent container, such as a database. In a layered system, you delegate to this layer any task that relates to reading from, and writing to, the persistent storage of choice.
No matter how many abstraction layers you build in your model, at some point you need to open a connection to some database. That’s where and when the DAL fits in. Over the years, a few patterns have been devised to design a DAL that is efficient and extensible. This chapter covers a number of these patterns.
It is key to note that the concept of a DAL is a bit nebulous. The idea of a DAL is extremely ...