研究(资料)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

Virmach 3.23美元可用6个月的VPS主机

Virmach 商家算是比较久且一直在低价便宜VPS方案中玩的不亦乐乎的商家,有很多同时期的商家纷纷关闭转让,也有的转型到中高端用户。而前一段时间也有分享过一次Virmach商家推出所谓的一次性便宜VPS主机,比如很低的价格半年时间,时间到服务器也就关闭。这不今天又看到商家有提供这样的产品。这次的活动产品包括圣何塞和水牛城两个机房,为期六个月,一次性付费用完将会取消,就这么特别的产品,适合短期玩玩...

HostYun 新上美国CN2 GIA VPS 月15元

HostYun 商家以前是玩具主机商,这两年好像发展还挺迅速的,有点在要做点事情的味道。在前面也有多次介绍到HostYun商家新增的多款机房方案,价格相对还是比较便宜的。到目前为止,我们可以看到商家提供的VPS主机包括KVM和XEN架构,数据中心可选日本、韩国、香港和美国的多个地区机房,电信双程CN2 GIA线路,香港和日本机房,均为国内直连线路。近期,HostYun上线低价版美国CN2 GIA ...

RackNerd:特价美国服务器促销,高配低价,美国多机房可选择,双E526**+AMD3700+NVMe

racknerd怎么样?racknerd今天发布了几款美国特价独立服务器的促销,本次商家主推高配置的服务器,各个配置给的都比较高,有Intel和AMD两种,硬盘也有NVMe和SSD等多咱组合可以选择,机房目前有夏洛特、洛杉矶、犹他州可以选择,性价比很高,有需要独服的朋友可以看看。点击进入:racknerd官方网站RackNerd暑假独服促销:CPU:双E5-2680v3 (24核心,48线程)内存...

持久化为你推荐
滚筒洗衣机和波轮洗衣机哪个好波轮洗衣机和滚桶洗衣机哪个好?哪个更实用?免费阅读小说app哪个好求一个看书比较好的APP轿车和suv哪个好轿车和SUV 的驾驶视野,那个比较好!!录音软件哪个好手机录音软件哪个好用宝来和朗逸哪个好朗逸和宝来那个比较好些各方面ps软件哪个好PS软件用哪种比较好?急用!尼康和佳能单反哪个好入门的单反相机 佳能和尼康哪个好?YunOSyunOS是手机里的什么软件系统啊?东莞电信宽带东莞电信光纤宽带包月费用多少 个人公司家用宽带办理东莞电信宽带东莞家用电信宽带有哪些套餐?
浙江vps 如何注册中文域名 zpanel BWH 视频存储服务器 gateone realvnc NetSpeeder 国外免费空间 ca4249 40g硬盘 qingyun 刀片服务器是什么 域名评估 免费测手机号 网游服务器 申请网页 申请免费空间和域名 国外网页代理 测试网速命令 更多