Hibernate-Preface(Hibernate前言)

来源:互联网 发布:淘宝生活网 编辑:程序博客网 时间:2024/06/05 02:09

Working with both Object-Oriented software and Relational Database 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 database.

Hibernate is an Object/Relation Mapping(ORM) solution for Java environments.

The term Object/Relational Mapping refers to the technique of mapping data between an object model representation to a relational data model representation.

See http://en.wikipedia.org/wiki/Object-relational mapping for a good high-level discussion.

Also,Martin Fowler's OrmHate article takes a look at a many of the mismatch problems,

面向对象的软件和关系型数据库两个一起工作是可以是繁琐和耗时的.

由于在对象与关系型数据库中数据如何表现的范例之间不匹配,开发成本是显著较高的.

Hibernate是一个Java环境下对象/关系 映射(ORM)Java解决方案

对象/关系映射术语参考在映射数据技巧与一个对象模型代表到一个关系型数据库模型代表之间

一个好的高水平的映射讨论见:http://en.wikipedia.org/wiki/Object-relational 另外 Martin Fowler's《ORM的厌倦》文章评判了许多不协调的问题


Although having a  strong background in SQL is not required to use Hiebrnate,having a basic understanding of the concepts can help you understand Hibernate more quickly and fully. 

An understanding of data modeling principles is especially important.

Both http://www.agiledata,org/essasy/dataModeling101.html and http://en,wikipedia,org/wiki/Data modeling are good starting points for understanding these data modeling principles.

虽然SQL有强大的背景不需要使用Hibernate,有一个基本对概念的了解可以帮助你更快更充分的了解Hibernate.

对数据建模原理的理解特别重要.

这两个网址http://www.agiledata,org/essasy/dataModeling101.html和http://en,wikipedia,org/wiki/Data对理解这些数据建模原理建模是一个好的起点.

Hibernate take care of the mapping for Java clsses to database tables,and from Java data types to SQL data types.

In addition,it provides data query and retrieval facilities.

It can significantly reduce development time otherwise spent with manual data handing in SQL and JDBC.

Hibernate's deign 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负责(有点照顾的意思)Java类到数据库的映射以及来自Java数据类型到SQL数据类型.而且它提供数据查询和检索设施.

它可以显著减少开发时间不然花在SQL和JDBC上手动数据处理.

Hibernate设计目标是通过排除需要手动使用SQL和JDBC手工制作处理数据来减轻开发者95%一般数据持久化相关编程任务的时间.

然而,不像其他持久化解决方案,Hibernate没有隐藏SQL的力量来自你以及保证你对关系型技术以及总是有效的知识投入

Hibernate many ont 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 remote or encapsulate vendor-specific SQL code and streamlines the common task of translating result sets from a tabular representation to a graph of objects.

See http://hibernate.org/orm/contribute/for information on getting involved.

The project and code for the tutorials referenced in this guide are available as hibernate-tutorials.zip

Hibernate不是那些只使用存储过程来实现数据库的业务逻辑以数据为中心的应用程序最好的解决方案

它有助于大部分对面向对象领域模块以及业务逻辑基于Java的中间层.

然而,Hibernate必然会帮你远程或者封装对于不用数据库的SQL语句以及简化一般来自表格表示图对象装换结果集的任务.

见参与htto://hibernate.org/orm/contribute/for的信息

在这个指南参考教程代码可在hibernate-tutorials.zip(链接)获得.

0 0