上下观古今,起伏千万途。这篇文章主要讲述Object/Relational Mapping数学关系 反面向对象相关的知识,希望能为你提供帮助。
【hibernate ORM 是对象关系映射框架 事实上的持久化存储引擎】
http://docs.jboss.org/hibernate/orm/5.2/userguide/html_single/Hibernate_User_Guide.html
【Object/Relational Mapping数学关系 反面向对象】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
等。
推荐阅读
- 安卓 log日志框架
- 更新Android Studio 3.0碰到的问题
- spring boot d多层级mapper
- Hadoop(十七)之MapReduce作业配置与Mapper和Reducer类
- Android 8.1.0 模拟器
- Android Studio 3.0 正式版 初体验
- 如何更改默认浏览器,本文教您如何更改默认浏览器
- 快捷方式存在问题,本文教您win7打开文件出现快捷方式存在问题
- 记事本在啥地方里,本文教您搜索win8的记事本的办法