ORM和ODM之间有什么区别? [英] What is the difference between an ORM and an 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屋!