O

ORM (Object-Relational Mapping)

ORM maps database tables to programming objects, enabling database operations through code without raw SQL.

What is ORM?

Object-Relational Mapping (ORM) is a programming technique that converts data between incompatible type systems (database tables and programming objects), allowing developers to work with databases using familiar object-oriented syntax.

Popular ORMs

SQLAlchemy (Python), Hibernate (Java), Entity Framework (.NET), Prisma (Node.js), ActiveRecord (Ruby).

Common misconceptions

  • "ORM replaces SQL knowledge" — Understanding SQL still important
  • "ORM is always slower" — Modern ORMs are optimized
  • "ORM prevents SQL injection" — Helps but not guaranteed