AI engineering glossary · SQL databases

What is ORM (object-relational mapper)?

Object-relational mapper (also called ORM): A library that lets code use programming-language objects to read and write database rows, generating SQL behind the scenes. SQLAlchemy and Django ORM are examples. It saves boilerplate but can hide inefficient queries.

Level: intermediateTopic: SQL databases

Object-relational mapper: an example

In Python, session.query(User).filter_by(city='Pune') becomes a SELECT with a WHERE clause.

Related terms

More SQL databases terms

Where you learn it

Object-relational mapper is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.