Data Access Logic
In the previous chapter, we introduced data processing logic: the layer that turns raw data into decision-ready information. To do that work, data processing logic often needs to retrieve and store data.
This chapter introduces the layer responsible for that job: data access logic.
Data access logic is where a system performs CRUD operations in a specific data store.
Data access logic is responsible for creating, reading, updating, and deleting data. It knows how to talk to a particular data store and how to perform operations safely and consistently.
Depending on the architecture, data access logic may be implemented in different ways, for example:
The form may differ, but the responsibility remains the same: perform data operations and return results.
Data processing logic manages the overall preparation of information. When it needs data, it calls data access logic to retrieve it.
A simple way to remember the difference:
This separation keeps responsibilities clean. Data processing logic does not need to know whether data comes from SQL Server, a REST API, or a file. Data access logic hides those details.
Data access logic may still include rules, but they are rules about data access itself:
These rules protect the integrity of the data store and ensure that data operations remain consistent.
With this context, we can define data access logic as follows:
Data access logic manages CRUD operations according to business rules in a specific type of data store.
In the next chapter, we will introduce a layer that connects business process states to the data that is available in those states: state logic.
Table of Content Introduction into Business Process Previous: Data Processing Logic Next: State Logic