DEV Community

Anudeep Reddy
Anudeep Reddy

Posted on

What is the difference between an ODM and an ORM

Discussion (1)

Collapse
nestedsoftware profile image
Nested Software • Edited on

ORM or Object-Relational Mapper maps objects to records in relational database tables (also sometimes referred to as relations, hence the name). Oracle, MySQL, and PostgreSQL are well-known relational databases.

ODM or Object-Document Mapper does the same for non-relational, document-based databases like MongoDB - it will map objects to documents.

In both cases the idea is to make persistence of objects in an object-oriented application as simple and transparent as possible - whatever kind of target database system you may be using for that persistence.