ORM

Object-relational mappers (ORMs) provide a way to define and interact with databases through application code instead of hand-writing all SQL queries.

They are useful because they let application structure, data validation, and persistence logic meet in one layer instead of scattering that work across ad hoc query fragments.

Where ORMs fit

ORMs are most valuable when applications repeatedly work with the same entities, relationships, and lifecycle rules. In that setting, model definitions, query abstractions, and migrations can reduce duplication and make domain structure more explicit.

They are especially common in typed backend systems such as FastAPI applications using SQLModel, and in JavaScript applications that map application objects onto relational or document databases.

What they do well

  • Keep recurring query and persistence logic close to application code.
  • Make relationships, defaults, and constraints more visible at the model layer.
  • Reduce repetitive database boilerplate for common create, read, update, and delete patterns.
  • Support migrations and schema evolution when paired with the right tooling.

Pressure points

  • ORMs can hide SQL costs until performance work becomes urgent.
  • Complex joins, indexing strategy, and analytical queries still require database literacy.
  • Poorly designed models make both the application and the database harder to reason about.
  • The abstraction is most helpful when teams understand the underlying data model rather than using the ORM to avoid it.

Prisma

  • Type-safe database client
  • Supports many databases
  • Easy relation API

Mongoose

Sequelize

  • For Node.js and MySQL
  • Supports SQL-based databases
  • Migrations, model associations, and hooks

SQLAlchemy

SQLModel

  • Built on top of SQLAlchemy and Pydantic
  • Fits typed FastAPI applications
  • Keeps data-model definitions close to API schema work