Object/Relational Mapping 數學關係 反物件導向

來源:互聯網
上載者:User

標籤: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]就算是一種中繼資料。

物件關聯對映成功運用在不同的物件導向持久層產品中,如:Torque,OJB,Hibernate,TopLink,Castor JDO,TJDO,Active Record,NHibernate,ADO.NET Entity Framework 等。

 

 

 

Object/Relational Mapping 數學關係 反物件導向

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.