We may earn an affiliate commission when you visit our partners.

ORM

Save
May 1, 2024 Updated July 1, 2025 11 minute read

Object-relational mapping (ORM) is a programming technique that allows programmers to create objects that correspond to the data in a relational database. This makes it easier to work with data in a database, as programmers can use the objects to represent the data instead of having to write SQL queries directly. ORM frameworks take care of the plumbing involved in mapping objects to database tables, allowing developers to focus on writing business logic and less on data access code.

Using ORM

ORM frameworks can be used in a variety of programming languages, including Python, Java, and C#. Some of the most popular ORM frameworks for Python are SQLAlchemy, Django ORM, and Peewee. For Java, there is Hibernate, JPA, and iBatis. And for C#, there is Entity Framework, NHibernate, and LLBLGen Pro.

Once an ORM framework is integrated into an application, developers can use it to map objects to database tables. This is done by creating a class that inherits from a base class provided by the ORM framework. The class should have properties that correspond to the columns in the database table. Once the class is created, the ORM framework will take care of the mapping between the objects and the database table.

Benefits of ORM

There are many benefits to using ORM frameworks. Some of the benefits include:

Share

Help others find this page about ORM: by sharing it with your friends and followers:

Reading list

We've selected five books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in ORM.
Introduces the concept of domain-driven design (DDD), which software development approach that focuses on creating software that is closely aligned with the business domain.
Provides a practical guide to using Entity Framework Core, which is an ORM framework for .NET.
Provides a comprehensive guide to using Hibernate, which is an ORM framework for Java.
Provides a beginner-friendly guide to using ORM with Spring and Hibernate.
Table of Contents
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser