diff --git a/source/odm.txt b/source/odm.txt new file mode 100644 index 00000000..2a34c4df --- /dev/null +++ b/source/odm.txt @@ -0,0 +1,197 @@ +========================= +ORMs, ODMs, and Libraries +========================= + +.. facet:: + :name: genre + :values: reference + +.. meta:: + :description: MongoDB has ORMs, ODMs, and Libraries to simplify interactions between your app and cluster. Use the best database for Ruby, Python, Java, C#, Node.js, PHP. + :keywords: Object Oriented, abstraction, serialization, relational, + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: twocols + + +`MongoDB Drivers `__ offer idiomatic APIs +and helpers for most programming languages, but some applications are suited to higher level +abstraction. In particular, developers may be used to interacting with data in a +more declarative fashion, for example by using ActiveRecord for Ruby. `Object-Relational Mappers +`__ (or ORMs) +can improve the developer experience customizing database interactions in the +following ways: + +* Abstracting away the need for query language. +* Managing serialization/deserialization of data into objects. +* Enforcing schema requirements. + +Because MongoDB is a non-relational database management system, ORMs are +sometimes referred to as ODMs (Object Document Mappers), but the terms can be +used interchangeably in the MongoDB domain. MongoDB, our +`community +`__, and our +partners provide several ODM libraries. + +The following are some examples of the best MongoDB ODM libraries for a number +of programming languages, including Ruby, Python, Java, C#, Node.js, and PHP. + +Ruby +---- + +Mongoid +~~~~~~~ + +The Mongoid ODM provides API parity with Rails wherever possible to ensure +developers that are used to working with a `Ruby on Rails +`__ framework can use the methods and mechanics +they’re already familiar with in ActiveRecord. + +See the `Mongoid documentation +`__ for more information. + +Python +------ + +Beanie +~~~~~~ + +Beanie is a third-party, asynchronous Python ODM based on `Pydantic +`__. Beanie uses corresponding documents +to interact with each database collection, and supports adding, updating, and +deleting documents. Beanie saves you time by removing boilerplate code, and it +helps you focus on the parts of your app that actually matter. + +See the `Beanie documentation `__ for more information. + +MongoEngine +~~~~~~~~~~~ + +MongoEngine is a third-party, synchronous Python ORM for MongoDB. It uses a +simple declarative API and is built on top of the +`MongoDB PyMongo Driver `__. + +See the `MongoEngine documentation `__ +for more information. + +Django +~~~~~~ + +Django MongoDB Backend is the official MongoDB integration for Django and +MongoDB. This integration supports many core Django features, including the +Django ORM. It translates Django ORM methods into equivalent MongoDB queries, +allowing developers to use the familiar Django interface. + +See the `Django MongoDB Backend documentation +`__ for +more information. + + +Java +---- + +Spring Data MongoDB +~~~~~~~~~~~~~~~~~~~ + +Spring Data MongoDB is a third-party Java ORM for MongoDB. The `Spring Data +`__ project provides a familiar and +consistent Spring-based programming model which is enhanced by +MongoDB-specific features and capabilities. Spring Data MongoDB uses a +POJO-centric model for interacting with collections and writing repository-style +data access layers. + +See the `Spring Data MongoDB documentation +`__ or the `Spring Boot +Integration with MongoDB Tutorial +`__ for more information. + +.. TODO: Hibernate + +.NET/C# +------- + +Entity Framework +~~~~~~~~~~~~~~~~ + +MongoDB Entity Framework Core Provider (EF Core Provider) is the official +intergration for MongoDB and EF Core. It allows developers +using C# in the .NET ecosystem to use `Entity Framework Core +`__ as their ODM which provides a +familiar API interface, query paradigm (LINQ), and design pattern. + +See the `EF Core provider documentation +`__ for more +information. + +Node.js +------- + +Mongoose +~~~~~~~~ + +Mongoose is a third-party Node.js-based ODM library for MongoDB. It enforces a specific +schema at the application layer and offers a variety of hooks, model validation, +and other features. + +See the `Mongoose documentation `__ or `MongoDB & +Mongoose: Compatibility and Comparison +`__ +for more information. + +Prisma +~~~~~~ + +Prisma is a third-party ODM for Node.js and Typescript that fundamentally differs from +traditional ORMs. It uses declarative Prisma schemas as the single +source of truth for both your database schema and models. The Prisma client +reads and writes data in a type-safe manner, and returns plain JavaScript objects. + +See `Prisma & MongoDB `__ for more information. + +PHP +--- + +Doctrine +~~~~~~~~ + +Doctrine is a third-party PHP MongoDB ODM. This library provides PHP object mapping +functionality and transparent persistence for PHP objects to MongoDB, as well as +a mechanism to map embedded or referenced documents. It can also create +references between PHP documents in different databases and work with `GridFS +buckets `__. + +See the `Doctrine MongoDB ODM documentation +`__ +for more information. + +Symfony +~~~~~~~ + +The Doctrine MongoDB ODM can be used to integrate MongoDB with +the Symfony PHP framework. Doctine's object mapping enables developers to get +the benefits of MongoDB features, such as flexible schema design +and advanced searches, alongside Symfony's reusable components and streamlined +web design. + +See the `Symfony MongoDB Integration page +`__ for more +information. + +.. TODO? Drupal + +Laravel +~~~~~~~ + +Laravel MongoDB is the official integration for MongoDB and Laravel. It extends +methods in the PHP Laravel API to provide developers the full suite of Laravel's +Eloquent and Query Builder features while using MongoDB as their datastore. +With this package, Laravel developers can take advantage of MongoDB's flexible schema +and extensive capabilities, while maintaining familiar patterns, relationships, +and features such as querying, caching, and more. + +See the `Laravel MongoDB documentation +`__ for more +information. diff --git a/source/other-document-dbs.txt b/source/other-document-dbs.txt index 356b3c8a..5c7d0a95 100644 --- a/source/other-document-dbs.txt +++ b/source/other-document-dbs.txt @@ -8,6 +8,7 @@ Other Document Database Compatibility /documentdb-support /cosmosdb-support + /odm See the following pages for information about other document databases' compatibility with MongoDB: