ORM (Object-Relational Mapping)

An ORM (object-relational mapping) is a library that maps database tables to objects in your programming language, letting you query and persist data without writing raw SQL.

ORMs translate between rows and language objects, handling CRUD, relationships, and migrations through a typed API. They speed up development and reduce boilerplate.

The trade-off is a layer of abstraction that can hide what SQL actually runs, sometimes causing performance surprises like N+1 queries. Many teams mix an ORM for common access with raw SQL for complex queries.

A PostgREST-style REST API offers a different path: you get a query interface over your schema without an ORM, while keeping raw SQL available when needed.

Related terms

See it in practice

Kolaybase gives you PostgreSQL, auth, storage, and a REST API in minutes.

Get started