# Java持久化框架开发
**Repository Path**: edu2act/course-framework-of-data-persistence
## Basic Information
- **Project Name**: Java持久化框架开发
- **Description**: 智能设备开发方向,《Java持久化框架开发》课程仓库
- **Primary Language**: Java
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 2
- **Forks**: 0
- **Created**: 2021-08-17
- **Last Updated**: 2023-11-09
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README

# Java企业级应用开发(持久化框架)
Hibernate是一个开放源代码的对象关系映射框架,它对JDBC进行了非常轻量级的对象封装,使得Java程序员可以随心所欲的使用对象编程思维来操纵数据库。 Hibernate可以应用在任何使用JDBC的场合,既可以在Java的客户端程序使用,也可以在Servlet/JSP的Web应用中使用,最具革命意义的是,Hibernate可以在应用EJB的J2EE架构中取代CMP,完成数据持久化的重任。
MyBatis也是一款持久化框架,它支持自定义SQL查询、存储过程以及高级映射,也是一个对象关系映射框架,与Hibernate相比它是把实体类和SQL语句之间建立了映射关系,而Hibernate是在实体类和数据库表之间建立了映射关系。
## 课程目标
通过本课程的学习,要求学生达到下列基本目标:
1. 熟练的运用Hibernate和MyBatis框架进行企业应用的开发;
2. 深入了解持久化框架中的ORM概念;
3. 掌握持久化框架的理论基础;
4. 掌握持久化框架和其他框架的整合技术及开发。
## 课程资料
|资料|链接|
|:---:|:---|
|教学大纲|[
查看](./materials/outline.pdf) [
下载](./materials/outline.doc) |
|进度计划|[
查看](./materials/schedule.pdf) [
下载](./materials/schedule.doc) |
|备课记录|[
查看](./preparelog) |
## 课程内容
| 章节 | 名称 | 内容 | 课件 | 课堂Demo |
|:---:|:---|:---|:---|:---|
|第一章|框架的搭建 |- 分层体系结构与持久化
- 软件的模型及ORM
- Hibernate介绍
- 第一个Hibernate程序|[
查看](./ch01-hibernate-architecture/ch01-hibernate-architecture.pdf)
[
下载](./materials/slides/ch01-hibernate-architecture.pptx)|01 JDBC进行持久化 [
下载](./ch01-hibernate-architecture/ch01-demo-01.7z)
02 Hibernate进行持久化 [
下载](./ch01-hibernate-architecture/ch01-demo-02.7z)|
|第二章|单实体映射 |- 单实体映射基础
- 单实体的属性映射
- 单实体的对象标识符映射
- 使用注解映射单实体|[
查看](./ch02-single-entity-mapping/ch02-single-entity-mapping.pdf)
[
下载](./materials/slides/ch02-single-entity-mapping.pptx)|01 单实体映射 [
下载](./ch02-single-entity-mapping/ch02-demo-01.7z)
02 单实体属性映射 [
下载](./ch02-single-entity-mapping/ch02-demo-02.7z)
03 单实体对象标识符映射 [
下载](./ch02-single-entity-mapping/ch02-demo-03.7z)
04 (注解)单实体映射 [
下载](./ch02-single-entity-mapping/ch02-demo-04.7z)|
|第三章|继承关系映射 |- 每个具体类对应一张表
- 每个类层次对应一张表
- 每个类对应一张表
- 三种映射方式对比|[
查看](./ch03-inheritance-mapping/ch03-inheritance-mapping.pdf)
[
下载](./materials/slides/ch03-inheritance-mapping.pptx)|01 每个具体类对应一个表 [
下载](./ch03-inheritance-mapping/ch03-demo-01.7z)
02 每个父类对应一个表 [
下载](./ch03-inheritance-mapping/ch03-demo-02.7z)
03 每个类对应一个表 [
下载](./ch03-inheritance-mapping/ch03-demo-03.7z)
04 (注解)每个具体类对应一个表 [
下载](./ch03-inheritance-mapping/ch03-demo-04.7z)
05 (注解)每个父类对应一个表 [
下载](./ch03-inheritance-mapping/ch03-demo-05.7z)
06 (注解)每个类对应一个表 [
下载](./ch03-inheritance-mapping/ch03-demo-06.7z)|
|第四章|一对一关联映射 |- 一对一关联映射
- 组合关系映射|[
查看](./ch04-one-to-one-mapping/ch04-one-to-one-mapping.pdf)
[
下载](./materials/slides/ch04-one-to-one-mapping.pptx)|01 一对一-主键关联 [
下载](./ch04-one-to-one-mapping/ch04-demo-01.7z)
02 一对一-唯一外键关联 [
下载](./ch04-one-to-one-mapping/ch04-demo-02.7z)
03 组合关系映射 [
下载](./ch04-one-to-one-mapping/ch04-demo-03.7z)
04 (注解)一对一-主键关联 [
下载](./ch04-one-to-one-mapping/ch04-demo-04.7z)
05 (注解)一对一-唯一外键关联 [
下载](./ch04-one-to-one-mapping/ch04-demo-05.7z)
06 (注解)组合关系映射 [
下载](./ch04-one-to-one-mapping/ch04-demo-06.7z)|
|第五章|一对多关联映射 |- 实体一对多关联
- 数据库一对多关联
- Hibernate 单向一对多关联
- Hibernate 双向一对多关联|[
查看](./ch05-one-to-many-mapping/ch05-one-to-many-mapping.pdf)
[
下载](./materials/slides/ch05-one-to-many-mapping.pptx)|01 单向一对多关联映射(Set) [
下载](./ch05-one-to-many-mapping/ch05-demo-01.7z)
02 单向一对多关联映射(List) [
下载](./ch05-one-to-many-mapping/ch05-demo-02.7z)
03 单向一对多关联映射(Map) [
下载](./ch05-one-to-many-mapping/ch05-demo-03.7z)
04 双向一对多关联映射 [
下载](./ch05-one-to-many-mapping/ch05-demo-04.7z)
05 (注解)双向一对多关联映射 [
下载](./ch05-one-to-many-mapping/ch05-demo-05.7z)|
|第六章|多对多关联映射 |- 实体多对多关联
- 数据库多对多关联
- Hibernate多对多关联映射|[
查看](./ch06-many-to-many-mapping/ch06-many-to-many-mapping.pdf)
[
下载](./materials/slides/ch06-many-to-many-mapping.pptx)|01 多对多关联映射 [
下载](./ch06-many-to-many-mapping/ch06-demo-01.7z)
02 (注解)多对多关联映射 [
下载](./ch06-many-to-many-mapping/ch06-demo-02.7z)|
|第七章|操作持久化对象 |- Session缓存
- Hibernate对象的生命周期
- Hibernate操作持久化对象|[
查看](./ch07-manage-persistant-object/ch07-manage-persistant-object.pdf)
[
下载](./materials/slides/ch07-manage-persistant-object.pptx)| |
|第八章|检索方式 |- Hibernate检索方式
- Hibernate检索策略|[
查看](./ch08-retrieval-mode/ch08-retrieval-mode.pdf)
[
下载](./materials/slides/ch08-retrieval-mode.pptx)|01 检索方式 [
下载](./ch08-retrieval-mode/ch08-demo-01.7z)
02 检索策略 [
下载](./ch08-retrieval-mode/ch08-demo-02.7z)|
|第九章|高级配置 |- Hibernate高级配置|[
查看](./ch09-advanced-configuration/ch09-advanced-configuration.pdf)
[
下载](./materials/slides/ch09-advanced-configuration.pptx)||
|第一章|概述 |- MyBatis框架概述|[
查看](./MyBatis-ch01-overview/CH01_MyBatis-overview.pdf)
[
下载](./MyBatis-ch01-overview/CH01_MyBatis-overview.pptx)|[
下载](./MyBatis-ch01-overview/MyBatisCH01.zip)|
|第二章|CURD操作 |- MyBatis的CURD操作|[
查看](./MyBatis-ch02-CURD/CH02_MyBatis-CURD.pdf)
[
下载](./MyBatis-ch02-CURD/CH02_MyBatis-CURD.pptx)|[
下载](./MyBatis-ch02-CURD/MyBatisCH02.zip)|
|第三章|关联映射 |- MyBatis关联映射|[
查看](./MyBatis-ch03-relation-mapping/CH03_MyBatis-relation-mapping.pdf)
[
下载](./MyBatis-ch03-relation-mapping/CH03_MyBatis-relation-mapping.pptx)|[
下载](./MyBatis-ch03-relation-mapping/MyBatisCH03.zip)|
|第四章|动态SQL |- MyBatis动态SQL|[
查看](./MyBatis-ch04-dynamic-SQL/CH04_MyBatis-dynamic-SQL.pdf)
[
下载](./MyBatis-ch04-dynamic-SQL/CH04_MyBatis-dynamic-SQL.pptx)|[
下载](./MyBatis-ch04-dynamic-SQL/MyBatisCH04.zip)|
|第五章|缓存配置 |- MyBatis缓存配置|[
查看](./MyBatis-ch05-cache-configuration/CH05_MyBatis-cache-configuration.pdf)
[
下载](./MyBatis-ch05-cache-configuration/CH05_MyBatis-cache-configuration.pptx)|[
下载](./MyBatis-ch05-cache-configuration/MyBatisCH05.zip)|
|第六章|其他配置 |- MyBatis其他配置|[
查看](./MyBatis-ch06-other-configuration/CH06_MyBatis-other-configuration.pdf)
[
下载](./MyBatis-ch06-other-configuration/CH06_MyBatis-other-configuration.pptx)|[
下载](./MyBatis-ch06-other-configuration/MyBatisCH06.zip)|
|第七章|注解 |- MyBatis注解|[
查看](./MyBatis-ch07-annotation/CH07_MyBatis-annotation.pdf)
[
下载](./MyBatis-ch07-annotation/CH07_MyBatis-annotation.pptx)|[
下载](./MyBatis-ch07-annotation/MyBatisCH07.zip)|
|第八章|集成Spring |- Spring集成MyBatis|[
查看](./MyBatis-ch08-integration/CH08_Spring-integration.pdf)
[
下载](./MyBatis-ch08-integration/CH08_Spring-integration.pptx)|[
下载](./MyBatis-ch08-integration/MyBatisCH08.zip)|