Data Access Layer
DAL
ELI5 — The Vibe Check
The data access layer is the entire floor of your architecture that handles talking to databases. It includes repositories, ORMs, query builders — everything between your business logic and the actual data storage. It's the department, not just the person.
Real Talk
An architectural layer that encapsulates all database interaction logic, providing a clean interface between the application's business logic and data storage mechanisms. The DAL contains repositories, data mappers, connection management, and query logic, allowing the business layer to remain storage-agnostic.
When You'll Hear This
"All database access goes through the data access layer — no raw SQL in the controller." / "The DAL abstracts whether we're using PostgreSQL, MongoDB, or an API as the data source."
Related Terms
Clean Architecture
Clean Architecture is like an onion with strict rules: the inner layers (your core business logic) have absolutely no idea the outer layers (databases, API...
Database
A database is like a super-organized filing cabinet for your app's data.
ORM (Object-Relational Mapper)
An ORM is like a translator between your code and your database. Instead of writing scary SQL, you just write normal code like `User.
Repository Pattern
Repository Pattern puts a layer between your business logic and your database, so your business code never writes SQL directly.