Last Updated: June 6, 2026
An Object-Relational Mapper, or ORM, is a library for reading and writing database rows through Python objects. A Product row in the products table becomes a Product instance in Python; a query becomes a method call; an update becomes an attribute assignment followed by a commit. The ORM writes the SQL. This lesson covers what ORMs do, why teams adopt one, the trade-offs that come with using one, and a tour of the major Python ORMs.