Skip to main content

Glossary

What Is an ORM

An ORM lets developers interact with a database using code instead of writing raw database queries. Plain-English definition for business owners.

Definition

An ORM (Object-Relational Mapper) is a tool that lets developers interact with a database using their programming language instead of writing raw database queries. It translates between two very different worlds: application code (where data is represented as objects) and databases (where data lives in tables with rows and columns). The developer works with familiar code structures, and the ORM handles the database communication behind the scenes. Laravel's Eloquent is one well-known example.

Why It Matters

ORMs make development faster and reduce a category of common bugs. When developers write raw database queries by hand, mistakes can lead to data corruption, security vulnerabilities, or performance problems. An ORM provides a safer, more standardised way to interact with data. It also makes the application more portable: if you ever need to switch database systems, the ORM abstracts away the differences. For a business owner, this means faster development, fewer data-related bugs, and lower long-term maintenance risk. For related concepts, see what is CRUD.

Example

A developer needs to find all invoices for a specific client that are overdue. Without an ORM, they write a raw SQL query: a string of database-specific syntax that is easy to get wrong and hard to maintain. With an ORM like Eloquent, they write something closer to natural code (Invoice where client is X and due date is before today) and the ORM translates that into the correct database query. The code is easier to read, easier to test, and less likely to contain security flaws. Browse the full glossary for related definitions.

Portrait of Alexander De Sousa, founder of Digital Royalty
Founder-led
“I’ve put everything I know into how this company works — the standards, the method, the care on every project. It runs through the whole team, and I hold us all to it.”

Alexander De Sousa · Founder LinkedIn

Featured on BBC Radio Solent

Get started

Tell us what you need

A few quick questions, then a straight answer from a real person — usually within a few hours.

Tell us what you're working on

Whether it's a new site, a platform, or a process that shouldn't be manual any more — we'll tell you honestly if we can help.