ORM
Object-Relational Mapper — a library that maps database tables to programming language objects, abstracting SQL.
Also: Object-Relational Mapper
Definition
An Object-Relational Mapper (ORM) is a library or framework that provides an abstraction layer between object-oriented code and relational databases, allowing developers to interact with databases using familiar programming language constructs instead of writing raw SQL. ORMs automatically generate SQL queries, handle database connections, and map database rows to objects. Examples include Hibernate (Java), SQLAlchemy (Python), ActiveRecord (Rails), and Prisma (TypeScript). ORMs speed development but can generate inefficient queries.
Example
“Instead of writing SQL, a Django ORM query User.objects.filter(age__gte=18).order_by('last_name') generates and executes the SQL automatically.”
Synonyms
- object mapper
- database abstraction layer
- entity framework
Antonyms / Opposites
- raw SQL
- direct database access
Images
CC-licensed · free to useVideo
Related Terms
- sql
- database
- active-record
- migration
