码迷,mamicode.com
首页 > 移动开发 > 详细

Object/Relational Mapping 数学关系 反面向对象

时间:2017-10-27 22:04:05      阅读:210      评论:0      收藏:0      [点我收藏+]

标签:databases   对象关系映射   com   using   you   active   hand   term   数学   

 【hibernate ORM 是对象关系映射框架 事实上的持久化存储引擎】

http://docs.jboss.org/hibernate/orm/5.2/userguide/html_single/Hibernate_User_Guide.html

Object/Relational Mapping

 

Working with both Object-Oriented software and Relational Databases can be cumbersome and time consuming. Development costs are significantly higher due to a paradigm mismatch between how data is represented in objects versus relational databases. Hibernate is an Object/Relational Mapping solution for Java environments. The term Object/Relational Mapping refers to the technique of mapping data from an object model representation to a relational data model representation (and visa versa).

【面向对象编程思想 操纵数据库】

Hibernate not only takes care of the mapping from Java classes to database tables (and from Java data types to SQL data types), but also provides data query and retrieval facilities. It can significantly reduce development time otherwise spent with manual data handling in SQL and JDBC. Hibernate’s design goal is to relieve the developer from 95% of common data persistence-related programming tasks by eliminating the need for manual, hand-crafted data processing using SQL and JDBC. However, unlike many other persistence solutions, Hibernate does not hide the power of SQL from you and guarantees that your investment in relational technology and knowledge is as valid as always.

Hibernate may not be the best solution for data-centric applications that only use stored-procedures to implement the business logic in the database, it is most useful with object-oriented domain models and business logic in the Java-based middle-tier. However, Hibernate can certainly help you to remove or encapsulate vendor-specific SQL code and will help with the common task of result set translation from a tabular representation to a graph of objects.

 

zh.wikipedia.org/wiki/对象关系映射

 

物件關聯對映英语:Object Relational Mapping,簡稱ORM,或O/RM,或O/R mapping),是一種程式設計技術,用於實現物件導向編程語言裡不同類型系統的資料之間的轉換。從效果上說,它其實是創建了一個可在編程語言裡使用的“虛擬物件資料庫”。如今已有很多免費和付費的ORM產品,而有些程式設計師更傾向於建立自己的ORM工具。

 

【源自数学的关系 是 反 面向对象的】

物件導向是從軟體工程基本原則(如耦合、聚合、封裝)的基礎上發展起來的,而關聯式資料庫則是從數學理論發展而來的,兩套理論存在顯著的區別。為了解決這個不匹配的現象,物件關聯對映技術應運而生。

簡單的說:ORM相當於中繼資料。具體到產品上,例如下邊的ADO.NET Entity Framework。DLINQ中實體類的屬性[Table]就算是一種中繼資料。

物件關聯對映成功運用在不同的物件導向持久層產品中,如:TorqueOJBHibernateTopLinkCastor JDOTJDOActive RecordNHibernateADO.NET Entity Framework 等。

 

 

 

Object/Relational Mapping 数学关系 反面向对象

标签:databases   对象关系映射   com   using   you   active   hand   term   数学   

原文地址:http://www.cnblogs.com/yuanjiangw/p/7745331.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!