ORM和ODM之间有什么区别? [英] What is the difference between an ORM and an ODM?

查看:3003
本文介绍了ORM和ODM之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找出ORM和ODM之间的区别是什么,据我理解的概念,ORM(对象关系映射器)映射数据之间的关系,其中ODM(对象文档映射器)处理文档。我正确的是假设mySQL是ORM的一个例子,MongoDB是ODM的一个例子?



我相信你可以看到,我不太熟悉理论的概念。

解决方案

MySQL是关系数据库的一个例子 - 你可以使用ORM



ORM的示例是 nHibernate 实体框架, a href =http://code.google.com/p/dapper-dot-net/ =noreferrer> Dapper 等...



MongoDB是文档数据库的一个示例 - 您可以使用ODM在代码中的对象和数据的文档表示之间进行转换(如果需要)。



Mandango 是MongoDB的ODM示例。


I am trying to figure out what the difference is between ORM and ODM, as far as I understand the concept, ORM (Object Relational Mapper) maps the relations between data, where as ODM (Object Document Mapper) deals with documents. Am I right in assuming that mySQL is an example of ORM and MongoDB is a example of ODM?

As I am sure you can see, I am not too familiar with the theory of the concept. Could someone please clarify the differences between the two?

解决方案

MySQL is an example of a relational database - you would use an ORM to translate between your objects in code and the relational representation of the data.

Examples of ORMs are nHibernate, Entity Framework, Dapper and more...

MongoDB is an example of a document database - you would use an ODM to translate between your objects in code and the document representation of the data (if needed).

Mandango is an example of an ODM for MongoDB.

这篇关于ORM和ODM之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆