Part 1: Getting started with Hibernate and EJB3.0
In part1, we show you why object persistence is such a complex topic and what soluctions you can apply in practice.
chapter1: O/R paradigm mismatch and several strategies to deal with it.
chapter2: a guide step-by-step through a tutorial with Hibernate, Java Persistence and EJB 3.0.
chapter3: learn how to design and implement complex business domain models in Java,and mapping metadata.
-->to understand why you need ORM,and how Hibernate,JPA,EJB3.0 work in practice.
Chaper1: Understanding OR persistence
Detate continues, but a solution called ORM now has wide acceptance.It mediates the application's interaction with a relational database,leaving the developer free to concentrate on teh business problem at hand.
Often,these recommendations won't even be specific to Hibernate.
Sometimes they will be our ideas about the best way to do things when working with persistent data,explained in the context of Hibernate.BEFORE WE CAN GET STARTED WITH HIBERNATE, HOWEVER, YOU NEED TO UNDERSTAND THE CORE PROBLEMS OF OBJECT PERSISTENCE AND ORM.FIRST: we difine persistent data management(
RDBMS只是这个PDM一种,用OO语言来描述就是说RDBMS是PDM interfacer的一种实现) in the context of object-oriented applications and discuss the relationship of SQL, JDBC,and Java,the underlying technologies and standards that Hibernate is built on.
THEN: discuss the so-called OR paradigm mismatch.These problem make it clear that we need tools and patterns to minimize the time we have to spend on the persistence-related code of our applications.
1.1 What is persistence?
If an information system didn't preserve data when it was powered off,the system would be of little practical use.When we talk about persistence in Java,we're normally talking about storing data in a relational database using SQL.
1.1.1 Relational databases
.............
But to say only this is to pay less respect than is due.
1.1.2 Understanding SQL
to tune the performace of ...
extend beyond Hibernate itself if you want to take advantage of the full power of modern SQL databases.
DDL,DML
1.1.3 Using SQL in Java
JDBC -->
often so tedious --> paradigm mismatch --> explore the mismatch problem by asking what persistence means in the context of OO application developement
first,let's widen persistence from just storing data to a broader,more mature understanding of what is invovled in
MAINTAINING AND USING PERSISTENCE DATA.1.1.4 Persistence in OO applications.
In an object-oriented application, persistence allows an object to outlive the process that created it. The state of the object can be stored to disk, and an object with the same can be re-created at some point in the future.
(这段话说的太好了!一个OO app所操作的是活生生的对象,其所输入输出的最好也都是对象,而别成像RDBMS里所表现的散开的单个字段.一个Persistence所要做的也正是将RDBMS中单个的字段值转译成OO app所需的Object,并在OO app与BD间建立一个Object-oriented DataBase系统,从而在OO app与RDBMS间充当Proxy/delegate的角色) This isn't limited to single objects--
entire networks of interconnected objects can be made persistence and later re-created in a new process.
从data-level到object-level
Almost all Java applciations contain a mix of persistence and transient objects; hence,we need a subsystem that manages our persistence data.
When we discuss persistence in this book, we're thinking of all these things:
Storage, organization,and retrieval of structure data.
Concurrency and data integrity.
Data sharing(
上面说的那个concurrency实质上不就是说data sharing的么?为什么在这还要另外再提data sharing呢?).
We're thinking of these problems in the context of an object-oriented application that uses a domain model.
The business logic isn't executed in the database;it's implemented in Java in the application tier.This allows business logic to make use of sophisticated OO concepts such as inheritance and polymorphism.For example,we could use well-known design patterns such as Strategy,Mediator,and Composite,all of which depend on polymorphic method calls.
If we consider SQL and relational databases again, we finally observe the mismatch between the two paradigms. SQL operations such as projection and join always result in a tabular representation of the resulting data.
paradigm mismatch(就像人类一样,虽然都是做那些吃喝拉撒睡这样的活动,都由于语言、宗教、历史、地域、气候等的不同,就有了paradigm的差异,这也很像翻译,表面上看是两本字典的对照,可要想灵活自如start-of-the-artly做出高质量的翻译,就得综合考虑以上列举的诸多因素):
当面对data-level的系统时,用SQL这样的语言.
而对Object-level的系统时,用Java这样OOish的语言.1.2 The paradigm mismatch (continued)
分享到:
相关推荐
【标题】"java读书笔记笔记笔记笔记笔记笔记" 暗示了这是一份关于Java编程语言的学习笔记,可能包含了作者在阅读Java相关书籍时所做的重要记录和理解。笔记通常涵盖了语言的基础概念、核心特性、类与对象、内存管理...
学生读书笔记共享-学生读书笔记共享系统-学生读书笔记共享系统源码-学生读书笔记共享管理系统-学生读书笔记共享管理系统java代码-学生读书笔记共享系统设计与实现-基于springboot的学生读书笔记共享系统-基于Web的...
总之,《深入浅出Hibernate》读书笔记涵盖了实体对象生命周期的转换、实体对象的识别机制以及Hibernate的多级缓存策略,这些都是理解并有效使用Hibernate的关键点。通过深入学习这些概念,开发者能够更好地掌握...
学生读书笔记共享-学生读书笔记共享系统-学生读书笔记共享系统源码-学生读书笔记共享管理系统-学生读书笔记共享管理系统java代码-学生读书笔记共享系统设计与实现-基于springboot的学生读书笔记共享系统-基于Web的...
Hibernate学习笔记整理 以下是 Hibernate 框架的详细知识点: Hibernate 介绍 Hibernate 是一个 ORM(Object-Relational Mapping)框架,用于将 Java 对象映射到数据库表中。它提供了一个简洁的方式来访问和操作...
hibernate读书笔记,里面有一些实例和解说,是自己整理的,非常适合开发时做参考
java虚拟机读书笔记,主要描述阅读Java虚拟机核心技术的描述。
【Java相关课程系列笔记之十四Hibernate学习笔记】 Hibernate是一个开源的对象关系映射(ORM)框架,它极大地简化了Java应用程序对数据库的操作。本笔记将详细阐述Hibernate的核心概念、使用方法和特性。 一、...
通过阅读《Java游戏编程读书笔记》这本书,你可以深入了解这些概念并学习如何将它们应用到实际项目中。文档中的内容可能涵盖了Java游戏开发的基本原理、代码示例、最佳实践以及常见问题的解决方案。通过深入学习和...
读书笔记:《数据结构与算法分析 java语言描述》 读书笔记
读书笔记:「数据结构与算法分析Java语言描述」读书笔记。
### 马士兵Java框架Hibernate学习笔记 #### 一、HelloWorld - **知识点概述**: - **项目搭建**:介绍了如何从零开始搭建一个简单的Hibernate项目。 - **环境配置**:包括了如何配置MySQL数据库、创建必要的表...
计算机技术的读书笔记10篇计算机技术的读书笔记10篇计算机技术的读书笔记10篇计算机技术的读书笔记10篇计算机技术的读书笔记10篇