ORM
A library that lets code read and write database rows as ordinary objects, generating the SQL for you.
In more detail
ORMs save a lot of repetitive SQL but still produce SQL, and can hide expensive queries, the classic being the N+1 query problem. Inspect the SQL they generate for complex queries. Entity Framework Core, Hibernate and Prisma are examples.
Example
Java: JPA is the standard and Hibernate the usual implementation.Related terms
- Entity Framework Core — Microsoft's object-relational mapper for .NET, which lets code query and save database data as C# objects and translates LINQ into SQL.
- SQL — The standard language for defining, querying and changing data in a relational database.
- entity — A thing in an application's domain with its own identity, such as a user, account or product, usually stored in a database.
- repository pattern — Putting all the code that reads and writes one kind of data behind a single object, so the rest of the app never talks to the database directly.
- N+1 query problem — A performance bug where code runs one query for a list and then one more query per item, so N items cost N+1 queries.
- Prisma — A popular TypeScript ORM that generates a typed database client from a schema file.
- Drizzle ORM — A lightweight TypeScript ORM whose queries look close to SQL.
- React cache — A React function that wraps another function so repeated calls with the same arguments during one server request reuse the first result.
Taught in
- Entity Framework Core: Code First and Migrations — Modern .NET Core, C# & Enterprise Microservices
- Database Access & Migrations: ORM & Data Layers — Production Full-Stack Engineering
- Persistence With JPA And Hibernate — Modern Java: Virtual Threads & High-Throughput Services
- Request Memoization: Automatic Deduplication Tiers — Next.js 15 & Modern App Router Architecture