研究(资料)Hibernate持久化技术在网上购书系统中的设计与实现毕业论文

持久化  时间:2021-01-30  阅读:()

学号200532580013

密级________________

武汉大学本科毕业论文

Hibernate持久化技术在网上购书系统中的设计与实现

院系名称国际软件学院

专业名称 软件工程

学生姓名 皮攀

指导教师 

二○○九年六月

BACHELOR'S DEGREE THESISOF WUHAN UNIVER SITY

The design and implement ofHibernate persistence in the OnlineBookstore

College Wuhan University

Subject  International Software

Engineering

Name  PiPan

Directed by  Professor

June 2009

郑重声明

本人呈交的学位论文是在导师的指导下独立进行研究工作所取得的成果所有数据、图片资料真实可靠。尽我所知除文中已经注明引用的内容外本学位论文的研究成果不包含他人享有著作权的内容。对本论文所涉及的研究工作做出贡献的其他个人和集体均已在文中以明确的方式标明。本学位论文的知识产权归属于培养单位。

本人签名 日期

摘 要

Hibernate是一个开放源代码的对象关系映射框架它对JDBC进行了非常轻量级的对象封装使得Java程序员可以随心所欲的使用对象编程思维来操纵数据库。Hibernate可以应用在任何使用JDBC的场合既可以在Java的客户端程序使用也可以在Servlet/JSP的Web应用中使用最具革命意义的是Hibernate可以在应用EJB的J 2EE架构中取代CMP完成数据持久化的重任。

本论文主要研究Hibernate的ORMObject Relationship Mapping 框架、持久 化 功 能 以 及 Hiberna te 中 的 六 个 核 心 接 口Session、SessionFactory、Transaction、Query、Criteria和Configuration 并对其进行相关实践。熟悉Hibernate中的框架结构、工作原理。结合Hibernate在网上购书网站上的实践体会和研究Hibernate的ORM框架和持久化。同时本论文也将说明利用Hiberna te的ORM框架和持久化功能来实现网上购书网站的业务层的基本功能。利用Hibernate的相关技术来对其功能进行优化达到高性能。关键词ORM持久化Hibernate的核心接口

ABSTRACT

Hibernate is a open source object-relation mapping framework, whoencapsulates JDBC in a l ight-weight-object way, and this makes Javaprogrammers operate database in the Object-Oriented way arbitrari ly.The Hibernate could user in the place where the JDBC could use, bothusing in the client, and in the the application of Servlet/JSP, themost revolutionary mean is that, the Hibernate could be used in theJ2EE with EJB instead of CMP, to accomplish the persistence.

The aim of this the paper is to study the ORM framework of theHibernate, persistence and the six core interfaces in the Hibernate:Session, SessionFactory, Transaction, Query  Criteria andConfiguration, and implement them in the project . Understanding theframework of the Hibernate, the principle and the API of theHibernate. With the implement of the Hibernate in the OnlineBookstore, experience and study the framework and persistence of theHibernate. Achievement: With the Hibernate to implementing the basefunctions of the business level of the Online Bookstore. Use the othertechnologies of the Hibernate to optimize the functions, reachinghigher efficiency.

Keywords  ORM  Persistence  Hibernate CoreInterface  Session  SessionFactory Transaction Query Criteria andConfiguration

目 录

第1章绪论. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1

1 .1本章内容介绍. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1

1 .2研究背景. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1

1 .3研究现状及发展趋势. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2

1 31研究现状 2

1 32发展趋势 3

1 .4项目研究的目的和意义. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4

141研究目的 4

142研究意义 5

1 .5论文的主要内容. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5

1 .6本章小结. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6

第2章网上购书系统方案设计. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7

1 .7本章内容介绍. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7

1 .8系统简单介绍. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7

1 81系统的定位以及系统开发软件 7

1 82系统的框架 . 7

1 .9系统总体方案设计. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9

1 91用户模块设计 10

1 92管理员模块设计 13

1 93系统模块设计 17

1 .10本章小结. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17

第3章Hibernate基本技术介绍. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18

1 .1 1本章内容介绍. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18

1 .12 Hibernate是什么. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18

1 .13Hibernate的主要内容. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19

1 131 Hibernate的框架 19

1 132Hibernate的工作原理 20

1 133Hibernate的核心接口 22

1 134Hibernate API中的主要部分 24

1 .14 Hibernate的优势和劣势. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24

1 .15本章小结. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25

第4章数据库设计. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26

1 .16本章内容介绍. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26

1 .17数据库需求分析. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26

1 .18数据库详细设计. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27

1 .19本章小结. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32

第5章系统实现与验证. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33

1 .20本章内容介绍. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33

1 .21系统实现. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33

1 21 1系统实现模块图 . 33

1 21 2基本类 34

iON Cloud七月促销适合稳定不折腾的用户,云服务器新购半年付8.5折,洛杉矶/圣何塞CN2 GT线路,可选Windows系统

iON Cloud怎么样?iON Cloud今天发布了7月份优惠,使用优惠码:VC4VF8RHFL,新购指定型号VPS半年付或以上可享八五折!iON的云服务器包括美国洛杉矶、美国圣何塞(包含了优化线路、CN2 GIA线路)、新加坡(CN2 GIA线路、PCCW线路、移动CMI线路)这几个机房或者线路可供选择,有Linux和Windows系统之分,整体来说针对中国的优化是非常明显的,机器稳定可靠,比...

Nocser:马来西亚独立服务器促销$60.00/月

Nocser刚刚在WHT发布了几款促销服务器,Intel Xeon X3430,8GB内存,1TB HDD,30M不限流量,月付$60.00。Nocser是一家注册于马来西亚的主机商,主要经营虚拟主机、VPS和马来西亚独立服务器业务,数据中心位于马来西亚AIMS机房,线路方面,AIMS到国内电信一般,绕日本NTT;联通和移动比较友好,联通走新加坡,移动走香港,延迟都在100左右。促销马来西亚服务器...

RAKsmart推出7.59美元/月,云服务器产品Cloud Server,KVM架构1核1G内存40G硬盘1M带宽基础配置

近期RAKsmart上线云服务器Cloud Server产品,KVM架构1核1G内存40G硬盘1M带宽基础配置7.59美元/月!RAKsmart云服务器Cloud Server位于美国硅谷机房,下单可选DIY各项配置,VPC网络/经典网络,大陆优化/精品网线路,1-1000Mbps带宽,支持Linux或者Windows操作系统,提供Snap和Backup。RAKsmart机房是一家成立于2012年...

持久化为你推荐
秦殇内存修改器秦殇poq.exe文件怎么修改啊盗版win8.1升级win10我的电脑是预装正版win8的,然后重装了盗版win8.1。现在我提取出了OEM KEY,怎么能升级到win10呢?朱祁钰和朱祁镇哪个好朱高炽在位时间长还是朱祁钰在位时间长?游戏盒子哪个好游戏盒子哪个好?dnf魔枪士转职哪个好魔枪转职哪个适合搬砖清理手机垃圾软件哪个好清理手机垃圾文件的软件哪个好?qq空间登录网页版求这张图的原图,是QQ空间最近网页版登录界面的背景qq空间登录网页版网页版QQ怎么登陆360云盘下载下载一个360云盘,怎么下载360云盘资源360云盘 百度云 微云 和彩云 那个好
vps是什么意思 免费顶级域名 空间打开慢 创宇云 合肥鹏博士 老左来了 免费吧 英雄联盟台服官网 supercache 中国联通宽带测试 买空间网 存储服务器 云销售系统 websitepanel alexa世界排名 web是什么意思 建站行业 nano 电脑主机 什么是云主机 更多