Data Access Layer
The data access layer provides access to persistence mechanisms. In the pattern’s orig‐ inal form, this referred to the system’s database. However, as in the case of the presen‐ tation layer, the layer’s responsibility is broader for modern systems.
First, ever since the NoSQL revolution broke out, it is common for a system to work with multiple databases. For example, a document store can act as the operational database, a search index for dynamic queries, and an in-memory database for performance-optimized operations.
![]() |
1 Evans, E. (2003). Domain-Driven Design: Tackling Complexity in the Heart of Software. Boston: Addison- Wesley.
Second, traditional databases are not the only medium for storing information. For example, cloud-based object storage2 can be used to store the system’s files, or a mes‐ sage bus can be used to orchestrate communication between the program’s different functions.3
Finally, this layer also includes integration with the various external information pro‐ viders needed to implement the program’s functionality: APIs provided by external systems, or cloud vendors’ managed services, such as language translation, stock mar‐ ket data, and audio transcription (see Figure 8-4).
![]() |